Check drive HealthStatus on a remote PC

I get tickets daily for drive errors on a remote PC’s. 100% of the time it is when someone unplugs their phone from the PC. But I am required to check the PC for any real errors. If I run get-disk on my PC, I have a “healthStatus” heading. It will say healthy/unhealthy. Get-Disk doesn’t have a -computername variable associated with it. Nor does Get-PhysicalDisk.
I have played around with Get-WMIObject also, but cant figure out how to get the “HealthStatus” of a remote PC.
I am using computer management to check the drives, but I would like to automate it to the point where I can just enter a PC name and check the drive. Maybe it isn’t possible?
Thanks for any input.

Assuming you have remoting turned on use invoke-command

If your command is short, I like just using the scriptblock, if it’s more advanced I think it’s easier to save everything to a ps1 file and run it that way


Invoke-Command -ComputerName server01 -ScriptBlock {Get-Culture}


Invoke-Command -FilePath c:\scripts\test.ps1 -ComputerName Server01

OK, I don’t have it turned on. Explains why I am not getting this info. It’s odd that I cant retrieve a lot on info from remote PC’s, but not the drive health. Thank you for your response.

failed with the following error message : The client cannot connect to the destination
specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for
the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following
command on the destination to analyze and configure the WinRM service: “winrm quickconfig”. For more information, see the
about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (willows-52:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : CannotConnect,PSSessionStateBroken

So I piped get-member to get-disk and see that it gets its information from

TypeName: Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Disk

So if you can get WMI from the remote pc’s you can get the same information by doing this:

Get-WmiObject -Namespace "root/microsoft/windows/storage" -Class "msft_disk" | select healthstatus

Thank you. That gives me more data than I originally was able to obtain. I receive the following:


I will need to figure out what “0” means (probably healthy) and figure out what unhealthy would be. 1 maybe.

Thanks again.

MSFT_Disk class

Thank you very much. You have been extremely helpful!

Happy to help! Plus I learned some things in the process.

You might find this helpful: