Remove-PhysicalDisk

Removes a physical disk from a specified storage pool.

Syntax

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

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.

Parameters

-AsJob

ps_cimcommon_asjob

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227967 or Get-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227966 cmdlet. The default is the current session on the local computer.

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

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-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
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-StoragePool

Type:CimInstance
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-StoragePoolFriendlyName

Specifies the friendly name of the storage pool. The friendly name may be defined by a user.

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

-StoragePoolName

Specifies the name of the storage pool provided by the Storage Management Provider.

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

-StoragePoolUniqueId

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

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

-VirtualDisk

Type:CimInstance
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-VirtualDiskFriendlyName

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

-VirtualDiskName

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

-VirtualDiskUniqueId

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

-WhatIf

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

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

Inputs

CimInstance

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

Outputs

CimInstance

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.