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

Popular posts from this blog

Sysaux tablespace is too big

SQL server mdf file modifed date

Developing Nightly DBA PACKAGE for MS SQL SERVER and ORACLE