Logical Drives

This one shouldn’t be a surprise

Get-WmiObject -Class Win32_LogicalDisk | Select DeviceId, Name, Description, VolumeName, DriveType, MediaType, FileSystem, Size, FreeSpace | Format-List

Note this command will also show mapped drives

Again if you want to see the list of properties available

(Get-WmiObject -Class Win32_LogicalDisk) | get-member

Will do that.  Note this is different from the method presented in the previous two posts.  It is done this way only to show a different way of achieving the same result.  Either method will work in all three cases.  One of the great strengths of PowerShell is the ability to do things in multiple ways (it can also be seen as a great weakness by people new to PowerShell)

Technorati Tags: , ,
This entry was posted in PowerShell and WMI. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s