Remove-PhysicalDisk

Removes a physical disk from a specified storage pool.

Syntax

Remove-PhysicalDisk
      [-StoragePool] <CimInstance>
      [-AsJob]
      [-CimSession <CimSession[]>]
      [-Confirm]
      -PhysicalDisks <CimInstance[]>
      [-ThrottleLimit <Int32>]
      [-WhatIf]
      [<CommonParameters>]
Remove-PhysicalDisk
      [-AsJob]
      [-CimSession <CimSession[]>]
      [-Confirm]
      -PhysicalDisks <CimInstance[]>
      -StoragePoolFriendlyName <String>
      [-ThrottleLimit <Int32>]
      [-WhatIf]
      [<CommonParameters>]
Remove-PhysicalDisk
      [-AsJob]
      [-CimSession <CimSession[]>]
      [-Confirm]
      -PhysicalDisks <CimInstance[]>
      -StoragePoolName <String>
      [-ThrottleLimit <Int32>]
      [-WhatIf]
      [<CommonParameters>]
Remove-PhysicalDisk
      [-AsJob]
      [-CimSession <CimSession[]>]
      [-Confirm]
      -PhysicalDisks <CimInstance[]>
      -StoragePoolUniqueId <String>
      [-ThrottleLimit <Int32>]
      [-WhatIf]
      [<CommonParameters>]
Remove-PhysicalDisk
      [-VirtualDisk] <CimInstance>
      [-AsJob]
      [-CimSession <CimSession[]>]
      [-Confirm]
      -PhysicalDisks <CimInstance[]>
      [-ThrottleLimit <Int32>]
      [-WhatIf]
      [<CommonParameters>]
Remove-PhysicalDisk
      [-AsJob]
      [-CimSession <CimSession[]>]
      [-Confirm]
      -PhysicalDisks <CimInstance[]>
      [-ThrottleLimit <Int32>]
      -VirtualDiskFriendlyName <String>
      [-WhatIf]
      [<CommonParameters>]
Remove-PhysicalDisk
      [-AsJob]
      [-CimSession <CimSession[]>]
      [-Confirm]
      -PhysicalDisks <CimInstance[]>
      [-ThrottleLimit <Int32>]
      -VirtualDiskName <String>
      [-WhatIf]
      [<CommonParameters>]
Remove-PhysicalDisk
      [-AsJob]
      [-CimSession <CimSession[]>]
      [-Confirm]
      -PhysicalDisks <CimInstance[]>
      [-ThrottleLimit <Int32>]
      -VirtualDiskUniqueId <String>
      [-WhatIf]
      [<CommonParameters>]

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.

Examples

EXAMPLE 1

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

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

Required Parameters

-PhysicalDisks

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

Type:CimInstance[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StoragePool

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.

Type:CimInstance
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-StoragePoolFriendlyName

Specifies the friendly name of the storage pool from which to remove the physical disk.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StoragePoolName

Specifies the name of the storage pool from which to remove the physical disk.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StoragePoolUniqueId

Specifies the ID of the storage pool from which to remove the physical disk.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VirtualDisk

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.

Type:CimInstance
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VirtualDiskFriendlyName

Specifies the friendly name of the virtual disk from which to remove the physical disk.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VirtualDiskName

Specifies the name of the virtual disk from which to remove the physical disk.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VirtualDiskUniqueId

Specifies the ID of the virtual disk from which to remove the physical disk.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-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.

Type:CimSession[]
Aliases:Session
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-ThrottleLimit

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.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

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

You can use the pipeline operator to pass an array of MSFT_PhysicalDisk objects to the PhysicalDisks parameter

Inputs

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

You can use the pipeline operator to pass an MSFT_StoragePool object to the StoragePool parameter.

Inputs

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

You can use the pipeline operator to pass an MSFT_VirtualDisk object to the VirtualDisk parameter.

Outputs

This cmdlet does not generate output.