Set-Disk

Set-Disk

Takes a Disk object or unique disk identifiers and a set of attributes, and updates the physical disk on the system.

構文

Parameter Set: ByNumberAttributes
Set-Disk [-Number] <UInt32> [-AsJob] [-CimSession <CimSession[]> ] [-Guid <String> ] [-IsReadOnly <Boolean> ] [-Signature <UInt32> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ById
Set-Disk -UniqueId <String> [-AsJob] [-CimSession <CimSession[]> ] [-IsOffline <Boolean> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByIdAttributes
Set-Disk -UniqueId <String> [-AsJob] [-CimSession <CimSession[]> ] [-Guid <String> ] [-IsReadOnly <Boolean> ] [-Signature <UInt32> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByIdConvertStyle
Set-Disk -UniqueId <String> [-AsJob] [-CimSession <CimSession[]> ] [-PartitionStyle <PartitionStyle> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByNumber
Set-Disk [-Number] <UInt32> [-AsJob] [-CimSession <CimSession[]> ] [-IsOffline <Boolean> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByNumberConvertStyle
Set-Disk [-Number] <UInt32> [-AsJob] [-CimSession <CimSession[]> ] [-PartitionStyle <PartitionStyle> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByObject
Set-Disk -InputObject <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-IsOffline <Boolean> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByObjectAttributes
Set-Disk -InputObject <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-Guid <String> ] [-IsReadOnly <Boolean> ] [-Signature <UInt32> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByObjectConvertStyle
Set-Disk -InputObject <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-PartitionStyle <PartitionStyle> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByPath
Set-Disk -Path <String> [-AsJob] [-CimSession <CimSession[]> ] [-IsOffline <Boolean> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByPathAttributes
Set-Disk -Path <String> [-AsJob] [-CimSession <CimSession[]> ] [-Guid <String> ] [-IsReadOnly <Boolean> ] [-Signature <UInt32> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByPathConvertStyle
Set-Disk -Path <String> [-AsJob] [-CimSession <CimSession[]> ] [-PartitionStyle <PartitionStyle> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

詳細説明

The Set-Disk cmdlet takes a Disk object or unique disk identifiers and a set of attributes, and updates the physical disk on the system.

パラメーター

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。

エイリアス

Session

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Guid<String>

Contains a globally unique ID (GUID).

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-InputObject<CimInstance[]>

Accepts an object from the pipeline as input.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-IsOffline<Boolean>

Specifies that the disk is offline.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-IsReadOnly<Boolean>

Sets the disk to be read-only, or read-write (read-only = false). Note: If the disk is set to read-only, then the disk must be set to read-only = false before using this cmdlet to set the PartitionStyle parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Number<UInt32>

Specifies a disk number on which the cmdlet acts.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-PartitionStyle<PartitionStyle>

Specifies the type of the partition. The acceptable values for this parameter are: MBR or GPT. The disk must be initialized (such as using theInitialize-Disk cmdlet) and set to read-write (IsReadOnly $false) before this cmdlet will work. The disk must be set to read-only = false before this cmdlet will work.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Path<String>

Contains the device instance path.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Signature<UInt32>

Contains the signature of the disk.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ThrottleLimit<Int32>

このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0 を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-UniqueId<String>

Specifies an ID used to uniquely identify a Disk object in the system. The ID persists through restarts.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • None

EXAMPLE 1

This example takes a disk that is offline and makes it online.

PS C:\> Set-Disk -Number 5 -IsOffline $False

EXAMPLE 2

This example takes a disk that is read-only and makes it writeable.

PS C:\> Set-Disk –Number 5 -IsReadonly $False

関連トピック

Clear-Disk

Get-Disk

Initialize-Disk

Update-Disk