Add-PhysicalDisk
Add-PhysicalDisk
Adds a physical disk to the specified storage pool or manually assigns a physical disk to a specific virtual disk.
構文
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>]
詳細説明
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.
パラメーター
-AsJob
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-CimSession<CimSession[]>
リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。
エイリアス |
Session |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-PhysicalDisks<CimInstance[]>
Specifies the physical disk objects to add to the storage pool. Enter one or more PhysicalDisk CIM objects.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-StoragePool<CimInstance>
Specifies the storage pool object to which you want to add the physical disk(s). Enter a StoragePool CIM object.
エイリアス |
なし |
必須? |
false |
位置は? |
1 |
既定値 |
なし |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-StoragePoolFriendlyName<String>
Specifies the friendly name of the storage pool to which you want to add the physical disk.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
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.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-StoragePoolUniqueId<String>
Specifies the ID of the storage pool to which you want to add the physical disk.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-ThrottleLimit<Int32>
このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0
を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Usage<Usage>
Specifies the allocation method (usage) for the disk. Valid values are AutoSelect, HotSpare, Journal, ManualSelect, Retired, and Unknown.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
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.
エイリアス |
なし |
必須? |
false |
位置は? |
1 |
既定値 |
なし |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
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.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
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.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
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.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Confirm
コマンドレットを実行する前に、ユーザーに確認を求めます。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-WhatIf
コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StoragePool
You can pipe an MSFT_StoragePool object to the StoragePool parameter.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk
You can pipe an MSFT_VirtualDisk object to the VirtualDisk parameter.
注
Microsoft.Management.Infrastructure.CimInstance
オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。シャープ記号 (#
) の後のパスは、基になる WMI オブジェクトの名前空間とクラス名です。
例
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)