Windows Powershell ForEach Object 循环
对管道对象逐个处理 如果使用Get-WmiObject 获取系统中的服务,为了排版可能会也会使用Format-Table对结果进行表格排版。 代码如下: PS C:Powershell> Get-WmiObject Win32_Service | Format-Table status,DisplayName -AutoSize status DisplayName —— ———– OK Adobe Acrobat Update Service OK Application Experience OK Application Layer Gateway Service
下载地址
用户评论