PowerShell Logo Small


This is the built-in help made by Microsoft for the command 'Add-PhysicalDisk', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.


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


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

Search powershellhelp.space


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.



Online Version: http://go.microsoft.com/fwlink/?LinkID=294419




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

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

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.

Example 2: Adding all available physical disks

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

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.

Example 3: Piping a storage pool to Add-PhysicalDisk

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

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.

Example 4: Manually assigning physical disks to a virtual disk

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

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.