New-FsrmFmjAction

New-FsrmFmjAction

Returns an action object for file management jobs.

Sintaxis

Parameter Set: CreateFmjAction0
New-FsrmFmjAction [-Type] <FmjActionTypeEnum> [-AsJob] [-CimSession <CimSession[]> ] [-Command <String> ] [-CommandParameters <String> ] [-ExpirationFolder <String> ] [-RmsFolderOwner] [-RmsFullControlUser <String[]> ] [-RmsReadUser <String[]> ] [-RmsTemplate <String> ] [-RmsWriteUser <String[]> ] [-SecurityLevel <FmjActionSecurityLevelEnum> ] [-ThrottleLimit <Int32> ] [-WorkingDirectory <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

The New-FsrmFmjAction cmdlet returns an object that you can use to create file management job actions. You can use the FsrmFmjAction object as input for the New-FsrmFileManagementJob cmdlet and the Set-FsrmFileManagementJob cmdlet.

The FsrmFmjAction object defines one action of the file management job when the job acts on a file. This cmdlet supports the following actions:
-- Expiration: Move the file to another location
-- RMS: Encrypt the file (Rights Management Services)
-- Custom: Run a command

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

-Command<String>

Specifies the command that the action runs. If you specify a command, you must specify Custom for the Type parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-CommandParameters<String>

Specifies the parameters that the action passes to the command when the action runs. If you specify parameters for a command, you must specify Custom for the Type parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ExpirationFolder<String>

Specifies a path that the action uses to expire files. If you specify an expiration folder, you must specify Expiration for the Type parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-RmsFolderOwner

Indicates that the action adds the RMS FolderOwner to the Full Control list. If a FolderOwner is not available for a file, this setting has no effect.

If you specify an RMS folder owner, you must specify RMS for the Type parameter. If you specify this parameter, do not specify the RMSFullControlUser, RMSReadUser, or RMSWriteUser parameters.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

false

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-RmsFullControlUser<String[]>

Specifies an array of email addresses to provide with full control to the Active Directory Rights Management Services (AD RMS) encryption. If you specify this cmdlet, you must specify RMS for the Type parameter. If you specify this parameter, do not specify the RMSTemplate parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-RmsReadUser<String[]>

Specifies an array of addresses to provide with read permission to the Active Directory Rights Management Services (AD RMS) encryption. If you specify this cmdlet, you must specify RMS for the Type parameter. If you specify this parameter, do not specify the RMSTemplate parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-RmsTemplate<String>

Specifies the name of the RMS template that the actions applies to files. If you specify an RMS template, you must specify RMS for the Type parameter. If you specify this parameter, do not specify the RMSFullControlUser, RMSReadUser, or RMSWriteUser parameters.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-RmsWriteUser<String[]>

Specifies an array of addresses to provide with write permission to the Active Directory Rights Management Services (AD RMS) encryption. If you specify this cmdlet, you must specify RMS for the Type parameter. If you specify this parameter, do not specify the RMSTemplate parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-SecurityLevel<FmjActionSecurityLevelEnum>

Specifies the system account that the action uses to run the command that you specify in the Command parameter. If you specify this parameter, you must specify Custom for the Type parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

LocalService

¿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

-Type<FmjActionTypeEnum>

Specifies the type of action that the file management job performs. Los valores aceptables para este parámetro son los siguientes:
-- Expiration
-- RMS
-- Custom

Alias

ninguno

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-WorkingDirectory<String>

Specifies the working directory in which the program or script runs. You must specify a valid path to a folder. File Server Resource Manager (FSRM) does not support paths to remote computers. If you specify this parameter, you must specify Custom for the Type parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿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.

Ejemplos

Example 1: Create an action that expires files

This command returns an object that expires files to the path C:\shares\expire01.

PS C:\> New-FsrmFmjAction -Type Expiration -ExpirationFolder "C:\shares\expire01"

Example 2: Create an action that encrypts files by using an RMS template

This command returns an action object that encrypts a file to the Contoso Confidential RMS template. This command requires that an RMS template is configured on the RMS server named "Contoso Confidential".

PS C:\> New-FsrmFmjAction -Type RMS -RmsTemplate "Contoso Confidential"

Example 3: Create an action that encrypts files and assigns RMS permissions

This command returns an action object that encrypts a file so that the administrator account in contoso.com has full control of the file, the ALLFTE security group has edit rights to the file, and the ALLStaff group has read rights to the file.

PS C:\> New-FsrmFmjAction -Type RMS -RmsFullControlUser "admin@contoso.com" -RmsReadUser "AllStaff@contoso.com" -RmsWriteUser "AllFTE@contoso.com"

Example 4: Create an action that runs a command

This command returns an action object that runs Cmd.exe and specifies the parameters for the command.

PS C:\> New-FsrmFmjAction -Type Custom -Command "C:\windows\system32\cmd.exe" -CommandParameters "echo [source file path] >> c:\log.txt"

Temas relacionados

New-FsrmFileManagementJob

Set-FsrmFileManagementJob