Earlier I have written this article SQL SERVER – Get a List of Fixed Hard Drive and Free Space on Server. I recently received excellent comment by MVP Ravikanth. He demonstrated that how the same can be done using Powershell. It is very sweet and quick solution.
Here is the powershell script. Run the same in your powershell windows.
Get-WmiObject -Class Win32_LogicalDisk | Select -Property DeviceID, @{Name=’FreeSpaceMB’;Expression={$_.FreeSpace/1MB} } | Format-Table -AutoSize
Well, I ran this script in my powershell window, it gave me following result – very accurately and easily.
Thanks Ravikanth one more time for excellent tip.
Reference: Pinal Dave (http://blog.SQLAuthority.com)
Tidak ada komentar:
Posting Komentar