Added modules from WinAPI
This commit is contained in:
parent
56da334ea2
commit
b709d7e96b
24 changed files with 657 additions and 125 deletions
13
Scripts/Get-DiskPartition.psm1
Normal file
13
Scripts/Get-DiskPartition.psm1
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
function Get-DiskPartition {
|
||||
$PhysicalDisk = Get-CimInstance -Namespace root/Microsoft/Windows/Storage -ClassName MSFT_PhysicalDisk
|
||||
$Partition = Get-CimInstance -Namespace root/Microsoft/Windows/Storage -ClassName MSFT_Partition |
|
||||
Select-Object @{Label="Disk"; Expression={$PhysicalDisk | Where-Object DeviceId -eq $_.DiskNumber | Select-Object -ExpandProperty FriendlyName}},
|
||||
IsBoot,
|
||||
IsSystem,
|
||||
IsHidden,
|
||||
IsReadOnly,
|
||||
IsShadowCopy,
|
||||
@{Label="OffSet"; Expression={($_.OffSet/1Gb).ToString("0.00 Gb")}},
|
||||
@{Label="Size"; Expression={($_.Size/1Gb).ToString("0.00 Gb")}}
|
||||
$Partition | Sort-Object Disk,OffSet
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue