I need a Powershell and WMI query that will do the following:
- Doesn't assume that SystemDrive is C: (this needs to run on hundreds of machines and windows may not be on C)
- Checks if there is less than 5GB left on that drive
- Must be done in a Select query only in the form below
- Get-WmiObject -Query "Select * From Win32...."
Basically I want to check that the system drive on many computers have enough space left before I apply an update but I have to work with the constraints above.
Cheers!