Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-PhysicalDisk

Set-PhysicalDisk

storagecmdlets.cdxml

Synopsis

Sets attributes on a specific physical disk.

Syntax

Set-PhysicalDisk [-AsJob] [-CimSession] [-Description] [-MediaType] [-NewFriendlyName] [-ThrottleLimit] [-Usage] [-UniqueId] [<CommonParameters>]

Set-PhysicalDisk [-FriendlyName] [-AsJob] [-CimSession] [-Description] [-MediaType] [-NewFriendlyName] [-ThrottleLimit] [-Usage] [<CommonParameters>]

Set-PhysicalDisk [-AsJob] [-CimSession] [-Description] [-MediaType] [-NewFriendlyName] [-ThrottleLimit] [-Usage] [-InputObject] [<CommonParameters>]

Detailed Description

The Set-PhysicalDisk cmdlet sets attributes on a specific physical disk in a storage pool, other than the primordial pool when using Storage Spaces.

When using the Storage Spaces subsystem, this cmdlet only works on physical disks that have been added to a storage pool.

Parameters

-AsJob <SwitchParameter>

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

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

Aliases

Session

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Description <String>

Sets the description of the specified physical disk.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-FriendlyName <String>

Specifies the friendly name of the physical disk on which to set attributes.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-InputObject <CimInstance[]>

Accepts a physical disk object from the pipeline as input.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByValue)

Accept wildcard characters?

false

-MediaType <MediaType>

Specifies a media type. The cmdlet changes the media type that is associated with physical disk to the media type that you specify. The acceptable values for this parameter are:  -- SSD -- HDD

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-NewFriendlyName <String>

Specifies the new friendly name of the physical disk.

Aliases

None

Required?

false

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.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-UniqueId <String>

Specifies the UniqueID of the physical disk on which to set attributes.

Aliases

Id

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-Usage <Usage>

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

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

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

Return Type

None

Notes

When using the Storage Spaces subsystem, this cmdlet works only on physical disks that have been added to a storage pool.

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

Examples

Example 1: Change the friendly name of a physical disk

This example changes the friendly name of PhysicalDisk4 to PhysicalDiskInSlot5.

PS C:\>Set-PhysicalDisk -FriendlyName "PhysicalDisk4" -NewFriendlyName "PhysicalDiskInSlot5"

Example 2: Change the Usage of a physical disk

This example changes the Usage property of PhysicalDisk2 to AutoSelect.

PS C:\>Set-PhysicalDisk -FriendlyName PhysicalDisk2 -Usage AutoSelect

Online Version
Add-PhysicalDisk
Get-PhysicalDisk
Remove-PhysicalDisk
Reset-PhysicalDisk