Set-PhysicalDisk
Set-PhysicalDisk
Sets attributes on a specific physical disk.
構文
Parameter Set: ByUniqueId
Set-PhysicalDisk -UniqueId <String> [-AsJob] [-CimSession <CimSession[]> ] [-Description <String> ] [-MediaType <MediaType> ] [-NewFriendlyName <String> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [ <CommonParameters>]
Parameter Set: ByFriendlyName
Set-PhysicalDisk [-FriendlyName] <String> [-AsJob] [-CimSession <CimSession[]> ] [-Description <String> ] [-MediaType <MediaType> ] [-NewFriendlyName <String> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [ <CommonParameters>]
Parameter Set: ByObject
Set-PhysicalDisk -InputObject <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-Description <String> ] [-MediaType <MediaType> ] [-NewFriendlyName <String> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [ <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 Storage Spaces subsystem, this cmdlet only works on physical disks that have been added to a storage pool.
パラメーター
-AsJob
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-CimSession<CimSession[]>
リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。
エイリアス |
Session |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Description<String>
Sets the description of the specified physical disk.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-FriendlyName<String>
Specifies the friendly name of the physical disk on which to set attributes.
エイリアス |
なし |
必須? |
true |
位置は? |
1 |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-InputObject<CimInstance[]>
Accepts a physical disk object from the pipeline as input.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
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. このパラメーターに対して使用できる値:
-- SSD
-- HDD
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-NewFriendlyName<String>
Specifies the new friendly name of the physical disk.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-ThrottleLimit<Int32>
このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0
を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-UniqueId<String>
Specifies the UniqueID of the physical disk on which to set attributes.
エイリアス |
Id |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Usage<Usage>
Specifies the allocation method (usage) for the disk. Valid values are AutoSelect, HotSpare, Journal, ManualSelect, Retired, and Unknown.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_PhysicalDisk
You can use the pipeline operator to pass an MSFT_PhysicalDisk object to the InputObject parameter.
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
- None
注
When using the Storage Spaces subsystem, this cmdlet works only on physical disks that have been added to a storage pool.
Microsoft.Management.Infrastructure.CimInstance
オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。シャープ記号 (#
) の後のパスは、基になる WMI オブジェクトの名前空間とクラス名です。
例
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