Windows PowerShell is a powerful scripting language that enables users to automate tasks and manage Windows systems. One of the most useful commands in Windows PowerShell is the New-VirtualDisk command. This command is used to create a new virtual disk on a computer or server. It can be used to create a new virtual hard drive, a new virtual optical drive, or a new virtual floppy drive. In this article, we will discuss the syntax, parameters, inputs, outputs, examples, and tips for using the New-VirtualDisk command.

Syntax of the New-VirtualDisk Command

The syntax of the New-VirtualDisk command is as follows:

New-VirtualDisk -FriendlyName -StoragePoolFriendlyName -Size [-ResiliencySettingName ] [-StorageTierFriendlyNames <string[]>] [-ProvisioningTypeDefault ] [-WriteCacheSizeDefault ] [-NumberOfColumns ] [-NumberOfDataCopies ] [-NumberOfGroups ] [-NumberOfCacheColumns ] [-NumberOfCacheRows ] [-NumberOfDataColumns ] [-NumberOfDataRows ] [-NumberOfParityColumns ] [-NumberOfParityRows ] [-NumberOfColumnsDefault ] [-NumberOfDataCopiesDefault ] [-NumberOfGroupsDefault ] [-NumberOfCacheColumnsDefault ] [-NumberOfCacheRowsDefault ] [-NumberOfDataColumnsDefault ] [-NumberOfDataRowsDefault ] [-NumberOfParityColumnsDefault ] [-NumberOfParityRowsDefault ] [-AccessPath ] [-AccessPaths <string[]>] [-IsManualAttach ] [-IsEnclosureAware ] [-IsPowerProtected ] [-ObjectId ] [-PassThru] [-CimSession <cimsession[]>] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] []</cimsession[]></string[]></string[]>

Parameters of the New-VirtualDisk Command

The parameters of the New-VirtualDisk command are as follows:

Parameter Description
FriendlyName The friendly name of the virtual disk.
StoragePoolFriendlyName The friendly name of the storage pool.
Size The size of the virtual disk.
ResiliencySettingName The resiliency setting name of the virtual disk.
StorageTierFriendlyNames The friendly names of the storage tiers.
ProvisioningTypeDefault The default provisioning type of the virtual disk.
WriteCacheSizeDefault The default write cache size of the virtual disk.
NumberOfColumns The number of columns of the virtual disk.
NumberOfDataCopies The number of data copies of the virtual disk.
NumberOfGroups The number of groups of the virtual disk.
NumberOfCacheColumns The number of cache columns of the virtual disk.
NumberOfCacheRows The number of cache rows of the virtual disk.
NumberOfDataColumns The number of data columns of the virtual disk.
NumberOfDataRows The number of data rows of the virtual disk.
NumberOfParityColumns The number of parity columns of the virtual disk.
NumberOfParityRows The number of parity rows of the virtual disk.
NumberOfColumnsDefault The default number of columns of the virtual disk.
NumberOfDataCopiesDefault The default number of data copies of the virtual disk.
NumberOfGroupsDefault The default number of groups of the virtual disk.
NumberOfCacheColumnsDefault The default number of cache columns of the virtual disk.
NumberOfCacheRowsDefault The default number of cache rows of the virtual disk.
NumberOfDataColumnsDefault The default number of data columns of the virtual disk.
NumberOfDataRowsDefault The default number of data rows of the virtual disk.
NumberOfParityColumnsDefault The default number of parity columns of the virtual disk.
NumberOfParityRowsDefault The default number of parity rows of the virtual disk.
AccessPath The access path of the virtual disk.
AccessPaths The access paths of the virtual disk.
IsManualAttach A Boolean value that indicates whether the virtual disk is manually attached.
IsEnclosureAware A Boolean value that indicates whether the virtual disk is enclosure aware.
IsPowerProtected A Boolean value that indicates whether the virtual disk is power protected.
ObjectId The object ID of the virtual disk.
PassThru A Boolean value that indicates whether the command should return the virtual disk object.
CimSession The CimSession object used to create the virtual disk.
ThrottleLimit The throttle limit of the virtual disk.
AsJob A Boolean value that indicates whether the command should run as a background job.
WhatIf A Boolean value that indicates whether the command should simulate the

Leave a Reply