New-FsrmFMJNotification

New-FsrmFMJNotification

Returns a notification object for file management jobs.

Sintaxis

Parameter Set: CreateFMJNotification0
New-FsrmFMJNotification [-Days] <UInt32> [-Action <CimInstance[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

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

The FsrmFmjAction object defines a notification period before a file management job acts on a file. This cmdlet supports the following actions:
-- Email
-- Event
-- Command

Parámetros

-Action<CimInstance[]>

Specifies an array of file management job actions. You can create a job action by using the New-FsrmFmjAction cmdlet.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-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

-Days<UInt32>

Specifies the number of days before a file management job acts on a file to run the notification action.

Alias

ninguno

¿Requerido?

true

¿Posición?

2

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.

Ejemplos

Example 1: Create a notification for file management jobs

The first command returns an object that represents a notification action. The notification action sends the specified email message to the administrator and file owner, and specifies that the action can attach a maximum of 1000 files to the message. The command stores the notification action object in the $action variable.

The second command returns a notification object for a file management job that runs the notification action stored in the $action variable 30 days before the file management job acts.

PS C:\> $action = New-FsrmFmjNotificationAction -Type Email -MailTo “[Admin Email];[File Owner]” -Subject “Warning: Files will expire soon” -Body “The attached list of files will expire in 30 days.” -AttachmentFileListSize 1000
PS C:\> New-FsrmFmjNotification –Days 30 -Action $action

Temas relacionados

New-FsrmFileManagementJob

Set-FsrmFileManagementJob

New-FsrmFmjAction

New-FsrmFmjNotificationAction