New-FsrmFmjAction

New-FsrmFmjAction

Returns an action object for file management jobs.

構文

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

詳細説明

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

パラメーター

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-CimSession<CimSession[]>

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

エイリアス

Session

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-Command<String>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

false

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

True (ByPropertyName)

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

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

LocalService

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

True (ByPropertyName)

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

false

-ThrottleLimit<Int32>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-Type<FmjActionTypeEnum>

Specifies the type of action that the file management job performs. このパラメーターに対して使用できる値:
-- Expiration
-- RMS
-- Custom

エイリアス

なし

必須?

true

位置は?

2

既定値

なし

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

True (ByPropertyName)

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

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

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)。

入力

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

出力

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

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"

関連トピック

New-FsrmFileManagementJob

Set-FsrmFileManagementJob