PowerShell Logo Small

Set-FileStorageTier



This is the built-in help made by Microsoft for the command 'Set-FileStorageTier', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Assigns a file to a storage tier.

SYNTAX


Set-FileStorageTier [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] -DesiredStorageTierFriendlyName <String> -FilePath <String> [-Confirm] [-WhatIf]
[<CommonParameters>]
Set-FileStorageTier [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] -DesiredStorageTierUniqueId <String> -FilePath <String> [-Confirm] [-WhatIf]
[<CommonParameters>]
Set-FileStorageTier [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] -DesiredStorageTier <CimInstance> -FilePath <String> [-Confirm] [-WhatIf]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


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.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=288114
Clear-FileStorageTier
Get-FileStorageTier
Get-StorageTier

REMARKS

<

Examples


Example 1: Pin a file to a storage tier

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



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.




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

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



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.