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)
- Microsoft To-Do App Available in Preview on Windows 10, iOS and Android - April 19, 2017
- Windows 10 Tip: What’s Mini View in Movies & TV App and How To Use it - April 15, 2017
- Windows 10 Tip: How To Convert MBR Partition to GPT without Losing Data - April 12, 2017
Last updated: 08/04/2014