Add-PhysicalDisk

Add-PhysicalDisk

Adds a physical disk to the specified storage pool or manually assigns a physical disk to a specific virtual disk.

Syntax

Parameter Set: ByStoragePool
Add-PhysicalDisk [[-StoragePool] <CimInstance> ] -PhysicalDisks <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-StoragePoolFriendlyName <String> ] [-StoragePoolName <String> ] [-StoragePoolUniqueId <String> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByVirtualDisk
Add-PhysicalDisk [[-VirtualDisk] <CimInstance> ] -PhysicalDisks <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [-VirtualDiskFriendlyName <String> ] [-VirtualDiskName <String> ] [-VirtualDiskUniqueId <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detaillierte Beschreibung

The Add-PhysicalDisk cmdlet adds a physical disk to the specified storage pool. The cmdlet can also assign a ManualSelect physical disk already in the storage pool to a specific virtual disk.

Parameter

-AsJob

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-CimSession<CimSession[]>

Führt das Cmdlet in einer Remotesitzung oder auf einem Remotecomputer aus. Geben Sie einen Computernamen oder ein Sitzungsobjekt ein, z. B. die Ausgabe eines Cmdlets New-CimSession oder Get-CimSession. Der Standardwert ist die aktuelle Sitzung auf dem lokalen Computer.

Aliasse

Session

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-PhysicalDisks<CimInstance[]>

Specifies the physical disk objects to add to the storage pool. Enter one or more PhysicalDisk CIM objects.

Aliasse

Keiner

Erforderlich?

true

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-StoragePool<CimInstance>

Specifies the storage pool object to which you want to add the physical disk(s). Enter a StoragePool CIM object.

Aliasse

Keiner

Erforderlich?

false

Position?

1

Standardwert

Keiner

Pipelineeingaben akzeptieren?

True (ByValue)

Platzhalterzeichen akzeptieren?

false

-StoragePoolFriendlyName<String>

Specifies the friendly name of the storage pool to which you want to add the physical disk.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-StoragePoolName<String>

Specifies the name of the storage pool, provided by the Storage Management Provider, to which you want to add the physical disk.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-StoragePoolUniqueId<String>

Specifies the ID of the storage pool to which you want to add the physical disk.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-ThrottleLimit<Int32>

Gibt die maximale Anzahl von gleichzeitigen Vorgängen an, die zum Ausführen dieses Cmdlets eingerichtet werden können. Wenn dieser Parameter ausgelassen oder der Wert 0 eingegeben wird, berechnet Windows PowerShell® einen optimalen Drosselungsgrenzwert für das Cmdlet basierend auf der Anzahl der CIM-Cmdlets, die auf dem Computer ausgeführt werden. Die Drosselungsgrenze gilt nur für das aktuelle Cmdlet und nicht für die Sitzung oder den Computer.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-Usage<Usage>

Specifies the allocation method (usage) for the disk. Valid values are AutoSelect, HotSpare, Journal, ManualSelect, Retired, and Unknown.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-VirtualDisk<CimInstance>

Specifies the virtual disk object to which to exclusively assign the physical disk(s). Enter one or more VirtualDisk CIM objects.

Note: To manually assign a physical disk to a virtual disk, first add the physical disk to the appropriate pool and set the Usage property on the disk to ManualSelect. You can do so by using the Add-PhysicalDisk or Set-PhysicalDisk cmdlets.

Aliasse

Keiner

Erforderlich?

false

Position?

1

Standardwert

Keiner

Pipelineeingaben akzeptieren?

True (ByValue)

Platzhalterzeichen akzeptieren?

false

-VirtualDiskFriendlyName<String>

Specifies the friendly name of the virtual disk to which to exclusively assign the physical disk(s)

Note: To manually assign a physical disk to a virtual disk, first add the physical disk to the appropriate pool and set the Usage property on the disk to ManualSelect. You can do so by using the Add-PhysicalDisk or Set-PhysicalDisk cmdlets.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-VirtualDiskName<String>

Specifies the name of the virtual disk to which to exclusively assign the physical disk(s)

Note: To manually assign a physical disk to a virtual disk, first add the physical disk to the appropriate pool and set the Usage property on the disk to ManualSelect. You can do so by using the Add-PhysicalDisk or Set-PhysicalDisk cmdlets.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-VirtualDiskUniqueId<String>

Specifies the ID of the virtual disk to which to exclusively assign the physical disk(s)

Note: To manually assign a physical disk to a virtual disk, first add the physical disk to the appropriate pool and set the Usage property on the disk to ManualSelect. You can do so by using the Add-PhysicalDisk or Set-PhysicalDisk cmdlets.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-Confirm

Sie werden vor dem Ausführen des Cmdlets zur Bestätigung aufgefordert.

Erforderlich?

false

Position?

named

Standardwert

falsch

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-WhatIf

Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.

Erforderlich?

false

Position?

named

Standardwert

falsch

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

<CommonParameters>

Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Eingaben

Der Eingabetyp ist der Typ der Objekte, die über die Pipeline an das Cmdlet übergeben werden können.

Hinweise

  • Das Microsoft.Management.Infrastructure.CimInstance-Objekt ist eine Wrapperklasse, die Objekte der Windows-Verwaltungsinstrumentation (WMI) anzeigt. Der Pfad nach dem Nummernzeichen (#) stellt den Namespace und den Klassennamen des zugrunde liegenden WMI-Objekts bereit.

Beispiele

Example 1: Adding a physical disk by storage pool friendly name

This example gets the PhysicalDisk object for the physical disk named PhysicalDisk5 and assigns it to the $PDToAdd variable. It then adds the PhysicalDisk object to the storage pool named CompanyData.

PS C:\> $PDToAdd = Get-PhysicalDisk -FriendlyName PhysicalDisk5
PS C:\> Add-PhysicalDisk -PhysicalDisks $PDToAdd -StoragePoolFriendlyName CompanyData

Example 2: Adding all available physical disks

This example gets all PhysicalDisk objects that can be added to a storage pool and assigns them to the $PDToAdd variable. It then adds the available physical disks to the storage pool named Demo Pool.

PS C:\> $PDToAdd = Get-PhysicalDisk -CanPool $True
PS C:\> Add-PhysicalDisk -StoragePoolFriendlyName "Demo Pool" -PhysicalDisks $PDToAdd

Example 3: Piping a storage pool to Add-PhysicalDisk

This example gets all storage pools (except primordial pools) and pipes the output to the Add-PhysicalDisk cmdlet (this will not work if you created more than one storage pool). This example then uses the Get-Physical Disk cmdlet inside of parentheses to specify all available physical disks without using variables.

PS C:\> Get-StoragePool -IsPrimordial $False | Add-PhysicalDisk -PhysicalDisks (Get-PhysicalDisk -CanPool $True)

Example 4: Manually assigning physical disks to a virtual disk

This example gets two physical disks that have already been added to the storage pool and designated as ManualSelect disks, PhysicalDisk3 and PhysicalDisk4, and assigns them to the virtual disk UserData.

PS C:\> Add-PhysicalDisk –VirtualDiskFriendlyName UserData –PhysicalDisks (Get-PhysicalDisk -FriendlyName PhysicalDisk3, PhysicalDisk4)

Verwandte Themen

Get-PhysicalDisk

Remove-PhysicalDisk

Reset-PhysicalDisk

Set-PhysicalDisk

Where-Object