永不落伍 发表于 2018-9-2 12:33:37

Powershell 获取磁盘信息

  $aryComputers="loopback","localhost"
  Set-Variable -Name intDriveType -Value 3 -Option Constant
  foreach($strComputer in $aryComputers)
  {
  "Hard drives on :"+$strComputer
  Get-WmiObject -Class win32_logicaldisk -ComputerName $strComputer |
  Where-Object{$_.drivetype -eq $intDriveType}
  }

页: [1]
查看完整版本: Powershell 获取磁盘信息