< Back

Add-PhysicalDisk

Wed Jan 30, 2019 6:01 pm

NAME Add-PhysicalDisk



SYNOPSIS

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





SYNTAX

Add-PhysicalDisk [-StoragePool] <CimInstance> [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-Usage {AutoSelect | ManualSelect | HotSpare |

Retired | Journal}] -PhysicalDisks <CimInstance[]> [-Confirm] [-WhatIf] [<CommonParameters>]



Add-PhysicalDisk [-VirtualDisk] <CimInstance> [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] -PhysicalDisks <CimInstance[]> [-Confirm] [-WhatIf]

[<CommonParameters>]



Add-PhysicalDisk -StoragePoolFriendlyName <String> [-Confirm] [-WhatIf] [<CommonParameters>]



Add-PhysicalDisk -StoragePoolName <String> [-Confirm] [-WhatIf] [<CommonParameters>]



Add-PhysicalDisk -StoragePoolUniqueId <String> [-Confirm] [-WhatIf] [<CommonParameters>]



Add-PhysicalDisk -VirtualDiskFriendlyName <String> [-Confirm] [-WhatIf] [<CommonParameters>]



Add-PhysicalDisk -VirtualDiskName <String> [-Confirm] [-WhatIf] [<CommonParameters>]



Add-PhysicalDisk -VirtualDiskUniqueId <String> [-Confirm] [-WhatIf] [<CommonParameters>]





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.





PARAMETERS

-CimSession [<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.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-PhysicalDisks <CimInstance[]>

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



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-StoragePool <CimInstance>

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



Required? true

Position? 1

Default value none

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-StoragePoolFriendlyName <String>

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



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-StoragePoolName <String>

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



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-StoragePoolUniqueId <String>

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



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-ThrottleLimit [<Int32>]

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.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Usage [<Usage>]

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



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-VirtualDisk <CimInstance>

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



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.



Required? true

Position? 1

Default value none

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-VirtualDiskFriendlyName <String>

Specifies the friendly name of the virtual disk to which to exclusively assign the physical disks.



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.



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-VirtualDiskName <String>





Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-VirtualDiskUniqueId <String>

Specifies the ID of the virtual disk to which to exclusively assign the physical disks.



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.



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value false

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



Required? false

Position? named

Default value false

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StoragePool

http://msdn.microsoft.com/library/windo ... 30551.aspx





You can pipe an MSFT_StoragePool object to the StoragePool parameter.



Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk

http://msdn.microsoft.com/library/windo ... 30584.aspx





You can pipe an MSFT_VirtualDisk object to the VirtualDisk parameter.





OUTPUTS



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.







RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=809329

Where-Object

Get-PhysicalDisk

Remove-PhysicalDisk

Reset-PhysicalDisk

Set-PhysicalDisk





CommonParameters : True

WorkflowCommonParameters : False

details : @{name=Add-StorageFaultDomain; noun=; verb=}

Syntax : @{syntaxItem=System.Object[]}

parameters : @{parameter=System.Object[]}

inputTypes : @{inputType=}

returnValues : @{returnValue=}

aliases : None



remarks : Get-Help cannot find the Help files for this cmdlet on this computer. It is displaying only partial help.

-- To download and install Help files for the module that includes this cmdlet, use Update-Help.

alertSet :

description :

examples :

Synopsis :

Add-StorageFaultDomain [-VirtualDisk] <CimInstance#MSFT_VirtualDisk> -StorageFaultDomains <CimInstance#MSFT_StorageFaultDomain[]>

[-CimSession <CimSession>] [-ThrottleLimit <int>] [-AsJob] [<CommonParameters>]



Add-StorageFaultDomain -VirtualDiskFriendlyName <string> -StorageFaultDomains <CimInstance#MSFT_StorageFaultDomain[]>

[-CimSession <CimSession>] [-ThrottleLimit <int>] [-AsJob] [<CommonParameters>]



Add-StorageFaultDomain -VirtualDiskName <string> -StorageFaultDomains <CimInstance#MSFT_StorageFaultDomain[]> [-CimSession

<CimSession>] [-ThrottleLimit <int>] [-AsJob] [<CommonParameters>]



Add-StorageFaultDomain -VirtualDiskUniqueId <string> -StorageFaultDomains <CimInstance#MSFT_StorageFaultDomain[]> [-CimSession

<CimSession>] [-ThrottleLimit <int>] [-AsJob] [<CommonParameters>]



Add-StorageFaultDomain [-StorageTier] <CimInstance#MSFT_StorageTier> -StorageFaultDomains <CimInstance#MSFT_StorageFaultDomain[]>

[-CimSession <CimSession>] [-ThrottleLimit <int>] [-AsJob] [<CommonParameters>]



Add-StorageFaultDomain -StorageTierFriendlyName <string> -StorageFaultDomains <CimInstance#MSFT_StorageFaultDomain[]>

[-CimSession <CimSession>] [-ThrottleLimit <int>] [-AsJob] [<CommonParameters>]



Add-StorageFaultDomain -StorageTierUniqueId <string> -StorageFaultDomains <CimInstance#MSFT_StorageFaultDomain[]> [-CimSession

<CimSession>] [-ThrottleLimit <int>] [-AsJob] [<CommonParameters>]



ModuleName : Storage

nonTerminatingErrors :

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

Name : Add-StorageFaultDomain

Category : Function

Component :

Role :

Functionality :