Here is a quick PowerShell tip that is going to be quite useful to reveal more information about your partitions setup on your computer, as information such as block size is not easy to get from the GUI tools.
The following basic cmdlet will read the local partitions and list all of them on the screen for you.
Get-WmiObject -Class Win32_DiskPartition
Note that the information listed above are quite basic. To get a full list of properties about your partitions on your computer, run this:
Get-WmiObject -Class Win32_DiskPartition | Select-Object -Property *
And of course, you can select certain properties you want to check as well. Simply type in the name of the properties, separate by comma, to replace the * in the command above. For example, the cmdlet below only lists the name of the machine, the caption of the partition, the blocksize, as well as whether is bootable.
Get-WmiObject -Class Win32_DiskPartition | Select-Object -Property PSComputerName, Caption, BlockSize, Bootable
What’s amazing is that you can even use the same cmdlet to query the information from a remote computer which you have the permission to access, by simply adding a switch -ComputeName followed by the name of the remote computer. For example,
Get-WmiObject -Class Win32_DiskPartition -ComputerName anothercomputer | Select-Object -Property PSComputerName, Caption, BlockSize, Bootable
Latest posts by Kent Chen (see all)
- The Page File (PageFile.sys) Guide for Windows 7, 8.1 and 10 - February 22, 2017
- How To Enable and Use Fetch Files Feature in OneDrive to Access All Your Files Remotely - February 21, 2017
- Speed Up Email Search for Outlook and Gmail with Email Insight App - February 20, 2017
Last updated: 08/04/2014