Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Powershell script to get the Disks that are offline

$
0
0
Hi I have a scenario where in i need to get disks infomation of 100+ remote servers using powershell script. I have below script which only giving the disk information which are online. 

Get-WmiObject win32_logicaldisk -computername MyServerName1,MyServerName2 | Where-Object { $_.DriveType -eq 3 } | Select-Object SystemName,DeviceID,VolumeName,FreeSpace,Size | Export-Csv C:\MyDiskSpace.Csv


I need to get he information for the disks that includes the disks that are offline as well. 

Please help.

Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>