It’s a very quick Powershell blog. Mount Points are such a pain in the bum. They’re great but just are not supported for easy querying.
The powershell get-mailboxdatabase | select name,edbfilepath,logfolderpath,servers gives you the name, location of the mailbox database and which servers it’s on.
Get-WMiObject -computer . Win32_Volume | Sort-Object name | format-table name,label,@{Label=”SizeGB”;Expression={ “{0:f2}” -f $($_.Capacity/1GB) } },@{Label=”FreeGB”;Expression={ “{0:f2}” -f $($_.FreeSpace/1GB)} },@{Label=”PctFree”;Expression={ “{0:f2}” -f $(100-(([double]$_.Capacity-[double]$_.FreeSpace)*100/[double]$_.Capacity))}}
This lists the df -H information: Disk mount point or drive letter, capacity (GB) and free space in GB and as a percentage to two decimal places. Between the two, you can easily work out what is where.
I have to admit the latter looks better as a script, but I’m going back to my early days of UNIX scripts to manipulate data. Every script had to fit onto as few, long lines as possible.
Change the “.” after -computer to run it on a remote computer.
You must be logged in to post a comment.