Set-FileStorageTier

Set-FileStorageTier

Assigns a file to a storage tier.

Sintaxis

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>]

Descripción detallada

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.

Parámetros

-AsJob

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-CimSession<CimSession[]>

Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.

Alias

Session

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

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.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-DesiredStorageTierFriendlyName<String>

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

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-DesiredStorageTierUniqueId<String>

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

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-FilePath<String>

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

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ThrottleLimit<Int32>

Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Confirm

Solicita confirmación antes de ejecutar el cmdlet.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-WhatIf

Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • This cmdlet does not generate any output.

Notas

  • El objeto Microsoft.Management.Infrastructure.CimInstance es una clase contenedora que muestra objetos de Instrumental de administración de Windows (WMI). La ruta de acceso después del signo de número (#) proporciona el espacio de nombres y el nombre de clase del objeto WMI subyacente.

Ejemplos

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"

Temas relacionados

Clear-FileStorageTier

Get-FileStorageTier

Get-StorageTier