8. PowerShell 用作日历计算
计算多少天到新年:
| PS> ([DateTime]"1/1/2007" -[datetime]::now).days |
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" |
| PS> set-itemproperty -path HKLM:SOFTWAREMICROSOFTWINDOWSCurrentVersionPoliciesSystem -name ConsentPromptBehaviorAdmin -value 0 |
| 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操作系统安装 (15929篇文章)
- Windows权限设置 (10439篇文章)
- Windows操作系统安全集 (19074篇文章)
- Windows频道 (10001篇文章)
- C盘Windows文件夹里重要文件作用 (784次浏览)
- 成功解决CPU为什么占用100%之谜 (755次浏览)
- 关于提高Windows操作系统重装 (543次浏览)
- Windows 2008安装后配置技巧 (230次浏览)
- USB设备还可以这样来安装进Windows (218次浏览)
- 明察秋毫 揪出占据C盘的真正凶手 (177次浏览)
- Windows XP下从硬盘安装Fedora 8的方法 (166次浏览)
- 分析Windows系统中各种不老实服务 (164次浏览)
- 你知道吗?Windows还能做很多事! (159次浏览)
- 深入了解:CPU占用率高有哪几种可能 (157次浏览)



