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)
- How To Disable Removable USB Storage Read, Write and Execute Access on Windows 10 - December 1, 2016
- Windows 10 Tip: How To Move System Tray to the Second Display - November 30, 2016
- How To Display The Last Logon Account Info on Windows 7 and 10 - November 29, 2016
Last updated: 08/04/2014