Set-FileStorageTier

Set-FileStorageTier

Assigns a file to a storage tier.

構文

Parameter Set: ByDesiredStorageTierFriendlyName
Set-FileStorageTier -DesiredStorageTierFriendlyName <String> -FilePath <String> [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByDesiredStorageTier
Set-FileStorageTier -DesiredStorageTier <CimInstance> -FilePath <String> [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByDesiredStorageTierUniqueId
Set-FileStorageTier -DesiredStorageTierUniqueId <String> -FilePath <String> [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Set-FileStorageTier cmdlet assigns a file to a specified storage tier. Assigning a file to a tier is also called pinning the file to a tier. To pin a file to a storage tier, the file must be on a volume that is hosted by the same tiered storage space. If you pin a file that is already assigned to a different tier, the file changes assignment the next time tier optimization takes place.

パラメーター

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-CimSession<CimSession[]>

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

エイリアス

Session

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-DesiredStorageTier<CimInstance>

Specifies the storage tier, as a CimInstance object, to pin a file to. To obtain a storage tier object, use the Get-StorageTier cmdlet.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-DesiredStorageTierFriendlyName<String>

Specifies the friendly name of a storage tier to pin a file to.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-DesiredStorageTierUniqueId<String>

Specifies the unique ID, as a string, of a storage tier to pin a file to.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-FilePath<String>

Specifies the full path of a file. The cmdlet pins the file that you specify to a storage tier.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-ThrottleLimit<Int32>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

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

false

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

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

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

false

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

false

<CommonParameters>

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

入力

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

出力

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

  • This cmdlet does not generate any output.

  • Microsoft.Management.Infrastructure.CimInstance オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。シャープ記号 (#) の後のパスは、基になる WMI オブジェクトの名前空間とクラス名です。

Example 1: Pin a file to a storage tier

The first command uses the Get-StorageTier cmdlet to get a storage tier named Tier07, and then stores the tier in the $StorageTier variable.

The second command pins the specified file to a storage tier. The command specifies the storage tier by using the object stored in the $StorageTier variable.

PS C:\> $StorageTier = Get-StorageTier -FriendlyName "Tier07"
PS C:\> Set-FileStorageTier -DesiredStorageTier $StorageTier -FilePath "D:\DataFile06.txt"

Example 2: Pin a file to a storage tier by using an ID

The first command uses the Get-StorageTier cmdlet to get a storage tier named Tier07, and then stores the tier in the $StorageTier variable.

The second command pins the specified file to a storage tier. The command specifies the ID of the storage tier by using the UniqueID property of the storage tier object stored in the $StorageTier variable.

PS C:\> $StorageTier = Get- StorageTier -FriendlyName "Tier07"
PS C:\> Set-FileStorageTier -DesiredStorageTierUniqueId $StorageTier.UniqueId -FilePath "D:\DataFile06.txt"

関連トピック

Clear-FileStorageTier

Get-FileStorageTier

Get-StorageTier