Display syntax for Get-Disk in the installed PowerShell session.
Get-Command Get-Disk -SyntaxGets one or more disks visible to the operating system. Note This cmdlet returns physical disk objects like basic disks and partitioned drive partitions. Dynamic disks can span multiple pieces of physical media, so they will not be returned by Get-Disk. For more information, see 【31†Basic and Dynamic Disks】.
Get-Command Get-Disk -SyntaxThis command prints the parameter sets available in the installed module. Compare the linked Microsoft reference for Windows PowerShell 5.1 / PowerShell 7 differences.
Display syntax for Get-Disk in the installed PowerShell session.
Get-Command Get-Disk -SyntaxRead all available parameter sets and help for the installed module.
Get-Help Get-Disk -FullDisplay examples from the installed help files.
Get-Help Get-Disk -Examples| Option / clause | Description |
|---|---|
-Verbose | Write additional diagnostic detail to the verbose stream. |
-Debug | Write debugging messages to the debug stream. |
-ErrorAction <action> | Control how a non-terminating error is handled. |
-ErrorVariable <name> | Store error records in a variable. |
-WarningAction <action> | Control how warnings are handled. |
-WarningVariable <name> | Store warning messages in a variable. |
-InformationAction <action> | Control how information messages are handled. |
-InformationVariable <name> | Store information messages in a variable. |
-OutVariable <name> | Store output in a variable as well as sending it onward. |
-OutBuffer <count> | Set the number of objects to collect before the next command runs. |
-PipelineVariable <name> | Store the current pipeline object in a variable during processing. |
-ProgressAction <action> | Control progress reporting in versions that support this parameter. |
-WhatIf / -Confirm | Risk-control parameters available only on commands that support ShouldProcess. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.