PowerShell for Windows Admins

Feb 26 2014   4:47PM GMT

Useful storage cmdlets

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

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

 

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: