学习网考试学习资料

Gzu521.com

Windows PowerShell的12项酷功能(2)

Windows Vista教程   点击:次   发布时间:2006-11-16   【字体: 】   来源:Gzu521.com
Gzu521.com我的学习网


  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()  cn jhp t)[ 此文转贴于我的学习网电脑课堂Windows Vista教程 http://www.Gzu521.com]cn jhp t)
  ps> $bitlockdrive.disablekeyprotectors() 
  ps> $bitlockdrive.enablekeyprotectors() 

上 一 页
2页: 第 [1] [2]

责任编辑:gzu521

电脑课堂分类
Windows 2000教程
Windows XP教程
Windows 2003教程
Windows Vista教程
LINUX教程
软件教学
办公软件
硬件DIY
分类推荐信息
更多...
大类最新文章
更多...