网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 操作系统 > Windows Vista
本月文章推荐
.让Windows vista系统只能识别自己.
.Vista SP2与Server2008 SP2有望明.
.性能的完美提升 细看VistaRC1五大.
.完全无损 详解Windows Vista系统.
.Windows Vista系统安装时间全面曝.
.保护隐私 让Vista搜索屏蔽个人内.
.Windows Vista内现神秘超大WinSx.
.从Windows Vista系统还原中夺回空.
.Windows Vista系统自带刻录功能评.
.Windows Vista用户帐户保护系统安.
.Windows Vista安全模式加载了哪些.
.Windows Vista奇怪故障修复—右键.
.Windows Vista系统将在加拿大全球.
.XP和Vista中查找快速启动文件夹位.
.隐藏Windows Vista系统开始菜单中.
.十条专家级的Vista应用与维护技巧.
.Windows Vista系列介绍之个人信息.
.Windows Vista网络和共享中心完全.
.在Windows Vista中安装IIS 7.
.如何从本地存储WIM文件启动Windo.

Windows PowerShell的12项酷功能

发表日期:2006-11-16


  Windows PowerShell 1.0已经发布,微软windowsvistablog上,开发人员列举了Windows Vista中Windows PowerShell所提供的12项酷酷的功能:

  解答PowerShell:PowerShell原来的开发代号是Monad,原计划是用以替代Windows中的命令行工具,但是后来微软说它只是技术上的扩充。使用PowerShell,管理员可以做任何在图形界面下所做的事情。Windows PowerShell 1.0可以运行在Windows XP SP2、Windows Server 2003和Windows Vista上。

  1. 内置Cmdlets (即"commandlets")

  Windows PowerShell中的所有Cmdlets都允许这样的动名词:get-service, get-process, stop-service, get-wmiobject.

  2. 强大的通配符和操作对象

  要得到以w开头的服务及其依赖服务只要输入:

  PS> get-service w* | format-list DisplayName, DependentServices

  3. 在犯错误前测试命令

  Windows PowerShell 有意向独特的功能:Whatif ,可以不执行命令就告诉你命令执行结果.如:

  PS> stop-service w3* -whatif

  4. 获取副本

  PowerShell 可以开始和结束所有命令的副本,可以在脚本中轻易测试命令并同时保存.

  PS> Start-Transcript -Path c:demodfoshow.txt
  PS> Stop-Transcript

  5. 从命令行发布Windows对话

  因为Windows PowerShell位对象而优化,可以向.NET Framework一样从命令行访问COM对象,下列命令告诉你的Vista机器发表"Windows Vista and PowerShell"字串.

  PS> $spVoice = new-object -com "SAPI.spvoice"
  PS> $spVoice.Speak("Windows Vista and PowerShell")

  6. 使用Windows PowerShell访问诸如Windows Media Player 11等的应用程序

  PS> $band = "The Posies"
  PS> $player = New-object -com wmplayer.ocx
  PS> $playlist = $player.mediacollection.getbyauthor($band)
  PS> $player.openPlayer($playlist.item(0).sourceurl)
  7. Windows PowerShell作为命令行存储计算器

  PowerShell可以完成基本的计算工作

  PS> 2*2

  不过,Windows PowerShell也可以快速解决存储问题,例如,备份11GB的数据需要多少个700MB的CD.

  PS> 11gb/700mb

  那么,需要多少个1000GB的存储来备份每个320GB,共425个的Vista桌面呢?

  PS > (320gb*425)/1000GB

  8. PowerShell 用作日历计算

  计算多少天到新年:

  PS> ([DateTime]"1/1/2007" -[datetime]::now).days

  9. 返回机器上某种类型文件的数量

  Windows Vista有许多类型的事件记录和组策略文件等.下列命令是返回当前目录及其子目录中VBScript, Bat 和 PowerShell 脚本的数量:

  PS> dir -include *.vbs, *.ps1, *.bat -recurse | group-object extension -noelement

  10. 从命令行收集Windows System Assessment Tool数据

  PS> get-wmiobject win32_winsat | format-table __SERVER, *SCORE -autosize
  PS> get-wmiobject win32_winsat | select *score | out-chart -Title "System Assessment Scores by PowerGadgets"

  11. 配置UAC(User Account Control)

  PS> set-itemproperty -path HKLM:SOFTWAREMICROSOFTWINDOWSCurrentVersionPoliciesSystem -name ConsentPromptBehaviorAdmin -value 0

  12. 管理BitLocker

  PS > $drives = get-wmiobject -namespace rootCIMv2SecurityMicrosoftVolumeEncryption -class Win32_EncryptableVolume
  PS> $drives | format-table DriveLetter, PersistentVolumeID -autosize
  PS> $BitLockDrive = $drives[0]
  PS> $BitLockDrive.GetProtectionStatus()
  PS> $BitLockDrive.DisableKeyProtectors()
  PS> $BitLockDrive.EnableKeyProtectors()

上一篇:在Windows Vista中安装IIS 7 人气:8447
下一篇:Windows Vista启动音乐:18个月就为了这4秒钟 人气:14011
浏览全部Windows PowerShell的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐