Useful storage cmdlets

Scanning through the Storage module there is a bunch of useful cmdlets – starting with the Get* cmdlets:

Get-Command -Module Storage get*

Get-Disk
Get-DiskImage
Get-FileIntegrity
Get-FileStorageTier
Get-InitiatorId
Get-InitiatorPort
Get-MaskingSet
Get-OffloadDataTransferSetting
Get-Partition
Get-PartitionSupportedSize
Get-PhysicalDisk
Get-ResiliencySetting
Get-StorageJob
Get-StorageNode
Get-StoragePool
Get-StorageProvider
Get-StorageReliabilityCounter
Get-StorageSetting
Get-StorageSubSystem
Get-StorageTier
Get-StorageTierSupportedSize
Get-SupportedClusterSizes
Get-SupportedFileSystems
Get-TargetPort
Get-TargetPortal
Get-VirtualDisk
Get-VirtualDiskSupportedSize
Get-Volume
Get-VolumeCorruptionCount
Get-VolumeScrubPolicy

£> Get-PhysicalDisk | Format-List FriendlyName, CanPool, OperationalStatus, HealthStatus, Usage, Size


FriendlyName      : PhysicalDisk0
CanPool           : False
OperationalStatus : OK
HealthStatus      : Healthy
Usage             : Auto-Select
Size              : 256060514304

 

£> Get-Disk | ft -a

Number Friendly Name      OperationalStatus Total Size Partition Style
------ -------------      ----------------- ---------- ---------------
0      HFS256G3AMNB-2200A Online             238.47 GB GPT

£> Get-Partition | ft -a


   Disk Number: 0

PartitionNumber DriveLetter Offset            Size Type
--------------- ----------- ------            ---- ----
1                           1048576         350 MB Recovery
2                           368050176       200 MB System
3                           577765376       128 MB Reserved
4               C           711983104    231.85 GB Basic
5                           249663848448   5.96 GB Recovery

£> Get-Volume | ft -a

DriveLetter FileSystemLabel  FileSystem DriveType HealthStatus SizeRemaining      Size
----------- ---------------  ---------- --------- ------------ -------------      ----
C           Windows          NTFS       Fixed     Healthy           160.2 GB 231.85 GB
            Windows RE tools NTFS       Fixed     Healthy           56.86 MB    350 MB
            Recovery image   NTFS       Fixed     Healthy          445.72 MB   5.96 GB

Leave a Reply