Editéieren

Deelen iwwer


Remove-PhysicalDisk

Removes a physical disk from a specified storage pool.

Syntax

ByStoragePool

Remove-PhysicalDisk
    [-StoragePool] <CimInstance>
    -PhysicalDisks <CimInstance[]>
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByVirtualDiskUniqueId

Remove-PhysicalDisk
    -PhysicalDisks <CimInstance[]>
    -VirtualDiskUniqueId <String>
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByVirtualDiskName

Remove-PhysicalDisk
    -PhysicalDisks <CimInstance[]>
    -VirtualDiskName <String>
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByVirtualDiskFriendlyName

Remove-PhysicalDisk
    -PhysicalDisks <CimInstance[]>
    -VirtualDiskFriendlyName <String>
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByVirtualDisk

Remove-PhysicalDisk
    [-VirtualDisk] <CimInstance>
    -PhysicalDisks <CimInstance[]>
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByStoragePoolUniqueId

Remove-PhysicalDisk
    -PhysicalDisks <CimInstance[]>
    -StoragePoolUniqueId <String>
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByStoragePoolName

Remove-PhysicalDisk
    -PhysicalDisks <CimInstance[]>
    -StoragePoolName <String>
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByStoragePoolFriendlyName

Remove-PhysicalDisk
    -PhysicalDisks <CimInstance[]>
    -StoragePoolFriendlyName <String>
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<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.

Parameters

-AsJob

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Session

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:

CimInstance[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:CimInstance
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByStoragePool
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-StoragePoolFriendlyName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByStoragePoolFriendlyName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StoragePoolName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByStoragePoolName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StoragePoolUniqueId

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByStoragePoolUniqueId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:CimInstance
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualDisk
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VirtualDiskFriendlyName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualDiskFriendlyName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VirtualDiskName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualDiskName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VirtualDiskUniqueId

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualDiskUniqueId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

CimInstance

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

CimInstance

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

CimInstance

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

Outputs

None

By default, this cmdlet doesn't return any output.

Notes

  • When used in Failover Cluster, cmdlets from the Storage module operate on cluster level (all servers in the cluster).