Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Remove-PhysicalDisk

Remove-PhysicalDisk

storagecmdlets.cdxml

Synopsis

Removes a physical disk from a specified storage pool.

Syntax

Remove-PhysicalDisk [-VirtualDisk] [-AsJob] [-CimSession] [-ThrottleLimit] [-VirtualDiskFriendlyName] [-VirtualDiskName] [-VirtualDiskUniqueId] [-PhysicalDisks] [-Confirm] [-WhatIf] [<CommonParameters>]

Remove-PhysicalDisk [-StoragePool] [-AsJob] [-CimSession] [-StoragePoolFriendlyName] [-StoragePoolName] [-StoragePoolUniqueId] [-ThrottleLimit] [-PhysicalDisks] [-Confirm] [-WhatIf] [<CommonParameters>]

Detailed Description

The Remove-PhysicalDisk cmdlet removes a physical disk from a specified storage pool. If sufficient space does not exist in the storage pool to tolerate this removal, then data loss can result (the user is warned about this). If the user configuration allows, then the user should add a replacement physical disk to the pool prior to removal of the old one.

Parameters

-AsJob <SwitchParameter>

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-CimSession <CimSession[]>

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Aliases

Session

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-PhysicalDisks <CimInstance[]>

Accepts one or more PhysicalDisk objects as input. The Physical Disk CIM objects represent the physical disks to be removed from the storage pool.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-StoragePool <CimInstance>

Specifies a storage pool as a CimInstance object. The cmdlet removes the physical disk associated with storage pool that you specify. To obtain a storage pool object, use the Get-StoragePool cmdlet.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

True (ByValue)

Accept wildcard characters?

false

-StoragePoolFriendlyName <String>

Specifies the friendly name of the storage pool. The cmdlet removes the physical disk associated with storage pool that you specify.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-StoragePoolName <String>

Specifies the name of the storage pool provided by the Storage Management Provider. The cmdlet removes the physical disk associated with storage pool that you specify.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-StoragePoolUniqueId <String>

Specifies an ID used to uniquely identify a storage pool in the system. The ID persists through reboots.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ThrottleLimit <Int32>

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-VirtualDisk <CimInstance>

Specifies a virtual disk as a CimInstance object. The cmdlet removes the physical disk associated with virtual disk that you specify. To obtain a virtual disk object, use the Get-VirtualDisk cmdlet.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

True (ByValue)

Accept wildcard characters?

false

-VirtualDiskFriendlyName <String>

Specifies the friendly name of a virtual disk. The cmdlet removes the physical disk associated with virtual disk that you specify.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-VirtualDiskName <String>

Specifies the name of a virtual disk. The cmdlet removes the physical disk associated with virtual disk that you specify.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-VirtualDiskUniqueId <String>

Specifies the unique ID of a virtual disk. The cmdlet removes the physical disk associated with virtual disk that you specify.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Confirm <SwitchParameter>

Prompts you for confirmation before running the cmdlet.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

-WhatIf <SwitchParameter>

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_PhysicalDisks
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StoragePool
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk

Return Type


Notes

None

Examples

EXAMPLE 1

This example removes a specific Physical Disk object from the specified storage pool.

PS C:\> $PDToRemove = Get-PhysicalDisk -Friendlyname "PhysicalDisk25"
PS C:\> Remove-PhysicalDisk -PhysicalDisks $PDToRemove -StoragePoolFriendlyName "DemoPool"

Online Version
Add-PhysicalDisk
Get-PhysicalDisk
Reset-PhysicalDisk
Set-PhysicalDisk
Get-StoragePool
Get-VirtualDisk