Reputation: 11
Powershell wmi to check and see if a disk is in ONLINE status? I could not find one online.
Upvotes: 0
Views: 1450
Reputation: 10044
Assuming that you are talking about the Operational Status property for "Online". Newer operating systems should have the WMI Class in MSFT_Disk in the root/Microsoft/Windows/Storage Namespace. The older Win32_Disk in root/cimv2 won't have it.
gcim MSFT_Disk -Namespace root/Microsoft/Windows/Storage | select FriendlyName,GUID,OperationalStatus
Upvotes: 2