Add modules from WinAPI (process managment and cim hardware)
This commit is contained in:
parent
3514ec6e3d
commit
bbfdb5d61f
11 changed files with 243 additions and 0 deletions
14
Scripts/Get-PD.psm1
Normal file
14
Scripts/Get-PD.psm1
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
function Get-PD {
|
||||
$PhysicalDisk = Get-CimInstance Win32_DiskDrive | Select-Object Model,
|
||||
@{Label="Size"; Expression={[int]($_.Size/1Gb)}},Partitions,InterfaceType
|
||||
$CollectionPD = New-Object System.Collections.Generic.List[System.Object]
|
||||
$PhysicalDisk | ForEach-Object {
|
||||
$CollectionPD.Add([PSCustomObject]@{
|
||||
Model = $_.Model
|
||||
Size = [string]$_.Size+" Gb"
|
||||
PartitionCount = $_.Partitions
|
||||
Interface = $_.InterfaceType
|
||||
})
|
||||
}
|
||||
$CollectionPD
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue