95 commands · 6 cheat sheets · Windows
Storage, Backup, and Resilience master quick reference
Browse 95 commands from 6 focused cheat sheets on page 1 of 1. Each example opens its matching detailed section.
Storage, Backup, and Resilience · 16 commands
DFS Namespaces and Replication Cheat Sheet
| Use | Syntax | Examples |
|---|---|---|
| Inspect DFS features | Get-WindowsFeature `
FS-DFS-Namespace,FS-DFS-Replication,RSAT-DFS-Mgmt-Con | View examples |
| Verify NTFS storage | Get-Volume |
Select-Object DriveLetter,FileSystem,HealthStatus,SizeRemaining | View examples |
| List namespace roots | Get-DfsnRoot | View examples |
| List namespace folders | Get-DfsnFolder -Path '\contoso.example\Public\*' | View examples |
| Inspect root targets | Get-DfsnRootTarget -Path '\contoso.example\Public' | View examples |
| Inspect folder targets | Get-DfsnFolderTarget -Path `
'\contoso.example\Public\Data' | View examples |
| Add folder target | New-DfsnFolderTarget -Path `
'\contoso.example\Public\Data' -TargetPath `
'\FS02\Data$' -WhatIf | View examples |
| Inspect referral settings | Get-DfsnRoot -Path '\contoso.example\Public' |
Select-Object State,TimeToLiveSec,EnableSiteCosting | View examples |
| List replication groups | Get-DfsReplicationGroup | View examples |
| List replicated folders | Get-DfsReplicatedFolder -GroupName 'Data-RG' | View examples |
| Inspect memberships | Get-DfsrMembership -GroupName 'Data-RG' -FolderName `
'Data' | View examples |
| Inspect connections | Get-DfsrConnection -GroupName 'Data-RG' | View examples |
| Measure replication backlog | Get-DfsrBacklog -GroupName 'Data-RG' -FolderName 'Data' `
-SourceComputerName FS01 -DestinationComputerName FS02 | View examples |
| Create propagation test | Start-DfsrPropagationTest -GroupName 'Data-RG' `
-FolderName 'Data' -ReferenceComputerName FS01 | View examples |
| Read DFSR events | Get-WinEvent -LogName 'DFS Replication' -MaxEvents 100 | View examples |
| Poll AD configuration | Update-DfsrConfigurationFromAD -ComputerName FS01 | View examples |
Storage, Backup, and Resilience · 14 commands
Windows Disks, Partitions, and Volumes PowerShell Cheat Sheet
| Use | Syntax | Examples |
|---|---|---|
| List physical disks | Get-PhysicalDisk | Sort-Object FriendlyName | View examples |
| List disks | Get-Disk | Sort-Object Number | View examples |
| Inspect one disk | Get-Disk -Number 2 |
Format-List Number, FriendlyName, SerialNumber, UniqueId, BusType, Size, PartitionStyle | View examples |
| List disk partitions | Get-Partition -DiskNumber 2 | View examples |
| List volumes | Get-Volume | Sort-Object DriveLetter, FileSystemLabel | View examples |
| Resolve a drive letter | Get-Partition -DriveLetter D | Get-Volume | View examples |
| Inspect resize range | Get-PartitionSupportedSize -DriveLetter D | View examples |
| Resize a partition | Resize-Partition -DriveLetter D -Size 500GB | View examples |
| Preview taking a disk offline | Set-Disk -Number 2 -IsOffline $true -WhatIf | View examples |
| Preview assigning a letter | Set-Partition -DiskNumber 2 -PartitionNumber 1 `
-NewDriveLetter R -WhatIf | View examples |
| Initialize a raw disk | Initialize-Disk -Number 2 -PartitionStyle GPT | View examples |
| Create a maximum partition | New-Partition -DiskNumber 2 -UseMaximumSize `
-AssignDriveLetter | View examples |
| Format a volume | Format-Volume -DriveLetter R -FileSystem NTFS `
-NewFileSystemLabel 'Archive' -Confirm | View examples |
| Scan a volume | Repair-Volume -DriveLetter D -Scan | View examples |
Storage, Backup, and Resilience · 17 commands
Windows Server Backup Cheat Sheet
| Use | Syntax | Examples |
|---|---|---|
| Inspect backup feature | Get-WindowsFeature Windows-Server-Backup | View examples |
| Read backup summary | Get-WBSummary | View examples |
| Inspect active job | Get-WBJob | View examples |
| Create editable policy | $Policy = New-WBPolicy | View examples |
| Add source volume | Add-WBVolume -Policy $Policy -Volume (Get-WBVolume `
-VolumePath 'D:') | View examples |
| Add file selection | Add-WBFileSpec -Policy $Policy -FileSpec (New-WBFileSpec `
-FileSpec 'D:\Data') | View examples |
| Include system state | Add-WBSystemState -Policy $Policy | View examples |
| Include bare-metal recovery | Add-WBBareMetalRecovery -Policy $Policy | View examples |
| Select backup target | $Target = New-WBBackupTarget -VolumePath 'E:' | View examples |
| Select network target | $Target = New-WBBackupTarget -NetworkPath `
'\backup01\wsb$' | View examples |
| Set policy schedule | Set-WBSchedule -Policy $Policy -Schedule 03:00 | View examples |
| Commit scheduled policy | Set-WBPolicy -Policy $Policy -WhatIf | View examples |
| Run one-time policy | Start-WBBackup -Policy $Policy -Async | View examples |
| List recoverable sets | Get-WBBackupSet -BackupTarget $Target | View examples |
| Mount backup for browsing | Get-WBBackupVolumeBrowsePath -BackupSet $BackupSet `
-VolumeInBackup $Volume | View examples |
| List wbadmin versions | wbadmin.exe get versions -backupTarget:E: | View examples |
| Inspect backup ACL | Get-Acl 'E:\WindowsImageBackup' | Format-List | View examples |
Storage, Backup, and Resilience · 16 commands
Windows Server Failover Clustering PowerShell Cheat Sheet
| Use | Syntax | Examples |
|---|---|---|
| Check the cluster feature | Get-WindowsFeature -Name Failover-Clustering, `
RSAT-Clustering-PowerShell | View examples |
| Load cluster cmdlets | Import-Module FailoverClusters; Get-Command -Module FailoverClusters |
Select-Object Name | View examples |
| Identify the cluster | Get-Cluster -Name 'AppCluster01' |
Format-List Name, Domain, QuarantineDuration, QuarantineThreshold | View examples |
| Inventory nodes | Get-ClusterNode -Cluster 'AppCluster01' |
Select-Object Name, State, NodeWeight, DynamicWeight, DrainStatus | View examples |
| Inventory clustered roles | Get-ClusterGroup -Cluster 'AppCluster01' |
Select-Object Name, State, OwnerNode, GroupType, Priority | View examples |
| Inspect role resources | Get-ClusterGroup -Cluster 'AppCluster01' -Name 'App Service' |
Get-ClusterResource | View examples |
| Inspect cluster networks | Get-ClusterNetwork -Cluster 'AppCluster01' |
Select-Object Name, State, Role, Address, AddressMask, Metric | View examples |
| Inspect quorum configuration | Get-ClusterQuorum -Cluster 'AppCluster01' |
Format-List Cluster, QuorumResource, QuorumType | View examples |
| List validation tests | Test-Cluster -Cluster 'AppCluster01' -List | View examples |
| Preview cluster validation | Test-Cluster -Cluster 'AppCluster01' -Include `
'Inventory','Network','System Configuration' -WhatIf | View examples |
| Inspect preferred owners | Get-ClusterGroup -Cluster 'AppCluster01' -Name 'App Service' |
Get-ClusterOwnerNode | View examples |
| Preview draining a node | Suspend-ClusterNode -Cluster 'AppCluster01' -Name `
'APPNODE01' -Drain -TargetNode 'APPNODE02' -Wait `
-WhatIf | View examples |
| Move one clustered role | Move-ClusterGroup -Cluster 'AppCluster01' -Name `
'App Service' -Node 'APPNODE02' -Wait 300 | View examples |
| Resume without failback | Resume-ClusterNode -Cluster 'AppCluster01' -Name `
'APPNODE01' -Failback NoFailback | View examples |
| Read recent cluster events | Get-WinEvent -FilterHashtable `
@{LogName='Microsoft-Windows-FailoverClustering/Operational'; `
StartTime=(Get-Date).AddHours(-2)} | View examples |
| Collect focused cluster logs | Get-ClusterLog -Cluster 'AppCluster01' -Node 'APPNODE01' `
-TimeSpan 30 -UseLocalTime -Destination `
'C:/ClusterEvidence' | View examples |
Storage, Backup, and Resilience · 16 commands
Windows Server Storage Replica Cheat Sheet
| Use | Syntax | Examples |
|---|---|---|
| Inspect Storage Replica feature | Get-WindowsFeature Storage-Replica,FS-FileServer | View examples |
| Inspect disks and volumes | Get-Volume |
Select-Object DriveLetter,FileSystem,AllocationUnitSize,Size,HealthStatus | View examples |
| Run topology test | Test-SRTopology @TopologyTest | View examples |
| Open topology report | Invoke-Item 'C:\SRTest\TestSrTopologyReport.html' | View examples |
| Create partnership | New-SRPartnership @Partnership | View examples |
| Inspect replication groups | Get-SRGroup -ComputerName SR01 | View examples |
| Inspect partnerships | Get-SRPartnership -SourceComputerName SR01 | View examples |
| Read Storage Replica events | Get-WinEvent -LogName `
'Microsoft-Windows-StorageReplica/Admin' -MaxEvents `
100 | View examples |
| Read performance counters | Get-Counter '\Storage Replica Statistics(*)\Current RPO' | View examples |
| Set asynchronous mode | Set-SRPartnership -SourceComputerName SR01 -SourceRGName `
RG01 -ReplicationMode Asynchronous -WhatIf | View examples |
| Constrain replication interfaces | Set-SRNetworkConstraint @NetworkConstraint -WhatIf | View examples |
| Resize replica log | Set-SRGroup -ComputerName SR01 -Name RG01 `
-LogSizeInBytes 16GB -WhatIf | View examples |
| Permit volume resize | Set-SRGroup -ComputerName SR01 -Name RG01 `
-AllowVolumeResize $true -WhatIf | View examples |
| Reverse replication direction | Set-SRPartnership -NewSourceComputerName SR02 `
-SourceRGName RG02 -DestinationComputerName SR01 `
-DestinationRGName RG01 -WhatIf | View examples |
| Suspend a group | Suspend-SRGroup -ComputerName SR01 -Name RG01 -WhatIf | View examples |
| Remove partnership | Remove-SRPartnership -SourceComputerName SR01 `
-SourceRGName RG01 -WhatIf | View examples |
Storage, Backup, and Resilience · 16 commands
Windows Storage Spaces PowerShell Cheat Sheet
| Use | Syntax | Examples |
|---|---|---|
| List non-primordial pools | Get-StoragePool -IsPrimordial $false |
Sort-Object FriendlyName | View examples |
| Inventory physical disks | Get-PhysicalDisk |
Select-Object FriendlyName, UniqueId, SerialNumber, MediaType, CanPool, HealthStatus, OperationalStatus, Size | View examples |
| Map disks in a pool | Get-StoragePool -FriendlyName 'AppPool' |
Get-PhysicalDisk | View examples |
| List pool-eligible disks | Get-PhysicalDisk -CanPool $true |
Sort-Object Size, UniqueId | View examples |
| Inspect storage subsystem | Get-StorageSubSystem |
Select-Object FriendlyName, UniqueId, HealthStatus, OperationalStatus | View examples |
| Inspect resiliency settings | Get-StoragePool -FriendlyName 'AppPool' |
Get-ResiliencySetting | View examples |
| Preview pool creation | New-StoragePool -FriendlyName 'AppPool' `
-StorageSubsystemFriendlyName 'Windows Storage*' `
-PhysicalDisks $disks -WhatIf | View examples |
| Preview mirrored virtual disk | New-VirtualDisk -StoragePoolFriendlyName 'AppPool' `
-FriendlyName 'AppData' -ResiliencySettingName Mirror `
-Size 500GB -WhatIf | View examples |
| List virtual disks | Get-VirtualDisk |
Select-Object FriendlyName, UniqueId, ResiliencySettingName, ProvisioningType, HealthStatus, OperationalStatus, Size | View examples |
| Inspect storage footprint | Get-VirtualDisk -FriendlyName 'AppData' |
Get-PhysicalDisk | View examples |
| Map space to volumes | Get-VirtualDisk -FriendlyName 'AppData' |
Get-Disk |
Get-Partition |
Get-Volume | View examples |
| Inspect pool capacity | Get-StoragePool -FriendlyName 'AppPool' |
Select-Object Size, AllocatedSize, HealthStatus, OperationalStatus | View examples |
| Preview adding a disk | $pool | Add-PhysicalDisk -PhysicalDisks $disk -WhatIf | View examples |
| Preview virtual-disk growth | Resize-VirtualDisk -FriendlyName 'AppData' -Size 750GB `
-WhatIf | View examples |
| Inspect storage jobs | Get-StorageJob |
Select-Object Name, JobState, PercentComplete, ElapsedTime, IsBackgroundTask | View examples |
| Preview virtual-disk repair | Repair-VirtualDisk -FriendlyName 'AppData' -WhatIf | View examples |



