PowerShell Logo Small

Add-PhysicalDisk



This is the built-in help made by Microsoft for the command 'Add-PhysicalDisk', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 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.

SYNOPSIS

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

SYNTAX


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



Search powershellhelp.space

DESCRIPTION


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.



<

RELATED LINKS

Where-Object
Get-PhysicalDisk
Remove-PhysicalDisk
Reset-PhysicalDisk
Set-PhysicalDisk

REMARKS

<

Examples


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

PS C:\> $PDToAdd = Get-PhysicalDisk -FriendlyName PhysicalDisk5



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



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.