powershell script to check Windows drive and its mounted point
For the 200+ SQL servers I managed, I use a few methods to check disk free space,
1. nightly SSIS job to collect didsk space and report each morning(blog later)
2. scheduled alert job using powershell script (blog later)
3. adhoc check the free space of disk /mount point folder remotely :
Get-WmiObject -Class win32_volume -ComputerName mySQLserverNames| Select-Object Name,Label,@{N='free';E={[math]::round($_.freespace / 1GB,2)}}, @{N='capacity';E={[math]::Round($_.capacity / 1GB,2)}}
Comments
Post a Comment