W2KSG: Disk Partitions

After we have found the physical drives we need to think about the partitions on those drives

Script Center Home > Microsoft Windows 2000 Scripting Guide > Scripting Solutions for System Administration > Disks and File Systems > Managing and Monitoring Disk Drives  Managing Disk Partitions

Listing 10.2

Get-WmiObject -Class Win32_DiskPartition | Select *

will show the full set of information available.  The more commonly needed data can be found with

Get-WmiObject -Class Win32_DiskPartition | Select BlockSize, Bootable, BootPartition, Description, DeviceID, DiskIndex, Index, Name, NumberofBlocks, PrimaryPartition, StartingOffset, Type


Share this post :


Technorati Tags: ,

About these ads
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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s