Set-PhysicalDisk [-CimSession <CimSession[]>] [-Description <String>] [-MediaType {HDD | SSD | SCM}][-NewFriendlyName <String>] [-ThrottleLimit <Int32>] [-Usage {AutoSelect | ManualSelect | HotSpare | Retired |Journal}] -UniqueId* <String> [<CommonParameters>]
Set-PhysicalDisk [-FriendlyName*] <String> [-CimSession <CimSession[]>] [-Description <String>] [-MediaType {HDD |SSD | SCM}] [-NewFriendlyName <String>] [-ThrottleLimit <Int32>] [-Usage {AutoSelect | ManualSelect | HotSpare |Retired | Journal}] [<CommonParameters>]
Set-PhysicalDisk [-CimSession <CimSession[]>] [-Description <String>] [-MediaType {HDD | SSD | SCM}][-NewFriendlyName <String>] [-ThrottleLimit <Int32>] [-Usage {AutoSelect | ManualSelect | HotSpare | Retired |Journal}] [<CommonParameters>]
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 Windows Storage subsystem, this cmdlet only works on physical disks that have been added to a storage pool.
-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.
-Description [<String>]
Sets the description of the specified physical disk.
-FriendlyName <String>
Specifies the friendly name of the physical disk on which to set attributes.
-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
-NewFriendlyName [<String>]
Specifies the new friendly name of the physical disk.
-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 PowerShellr 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.
-UniqueId <String>
Specifies the UniqueID of the physical disk on which to set attributes.
-Usage [<Usage>]
Specifies the allocation method (usage) for the disk. Valid values are AutoSelect, HotSpare, Journal, ManualSelect, Retired, and Unknown.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.
PS C:\> Set-PhysicalDisk -FriendlyName "PhysicalDisk4" -NewFriendlyName "PhysicalDiskInSlot5"
This example changes the friendly name of PhysicalDisk4 to PhysicalDiskInSlot5.
PS C:\> Set-PhysicalDisk -FriendlyName PhysicalDisk2 -Usage AutoSelect
This example changes the Usage property of PhysicalDisk2 to AutoSelect.
When using the Windows Storage 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.
This work is licensed under a Creative Commons Attribution 4.0 International. It is attributed to Microsoft Corporation and can be found here.
PowerShell Commands