external help file | Module Name | online version | schema |
---|---|---|---|
FSRM_Cmdlets.xml |
FileServerResourceManager |
2.0.0 |
Returns a notification action object for file management jobs.
New-FsrmFmjNotificationAction [-Type] <FmjNotificationActionTypeEnum> [-AsJob]
[-AttachmentFileListSize <UInt32>] [-Body <String>] [-CimSession <CimSession[]>] [-Command <String>]
[-CommandParameters <String>] [-EventType <FmjNotificationActionEventTypeEnum>] [-MailBCC <String>]
[-MailCC <String>] [-MailTo <String>] [-SecurityLevel <FmjNotificationActionSecurityLevelEnum>]
[-Subject <String>] [-ThrottleLimit <Int32>] [-WorkingDirectory <String>] [-Confirm] [-WhatIf]
The New-FsrmFmjNotificationAction cmdlet returns a notification action object that you can use to create file management job actions. You can use the FsrmFMJNotificationAction object as input for the following File Server Resource Manager (FSRM) cmdlets:
- New-FsrmFileManagementJob
- Set-FsrmFileManagementJob
- New-FsrmFileScreen
- Set-FsrmFileScreen
- New-FsrmFileScreenTemplate
- Set-FsrmFileScreenTemplate
The FsrmFmjAction object defines an action that the server performs when the notification period is reached. This cmdlet supports the following actions:
- Event
- Command
PS C:\>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
This command returns a notification action object that sends the specified email message to the administrator and file owner. The command specifies that the action can attach a maximum of 1000 files to the message.
PS C:\>New-FsrmFmjNotificationAction -Type Event -EventType Information -Body "Files will expire in 30 days."
This command returns a notification action object that logs an information event that contains the message Files will expire in 30 days. The server logs the event when an event that you associated with the action occurs.
PS C:\>New-FsrmFmjNotificationAction -Type Command -Command "c:\windows\system32\cmd.exe" -CommandParameters "echo [source file path] >> c:\log.txt"
This command returns a notification action object that runs Cmd.exe and logs the output in a file named Log.txt. The server runs Cmd.exe when an event that you associated with the action occurs.
ps_cimcommon_asjob
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the maximum number of files that the list can include.
Type: UInt32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the content of an email. If you specify this parameter, you specify Email or Event for the Type parameter.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227967 or Get-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227966 cmdlet. The default is the current session on the local computer.
Type: CimSession[]
Parameter Sets: (All)
Aliases: Session
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the command that the action runs. If you specify a command, you must specify Custom for the Type parameter.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
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.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the event type of the action. If you specify an event type, you must specify Event for the Type parameter. The acceptable values for this parameter are:
- None
- Information
- Warning
- Error
Type: FmjNotificationActionEventTypeEnum
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies a semicolon-separated list of email addresses for the Bcc recipients of an email. Valid email addresses are an administrator email account or the owner of the file. If you specify this parameter, you must specify Email for the Type parameter.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: -1
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies a semicolon-separated list of email addresses for the Cc recipients of an email. Valid email addresses are an administrator email account or the owner of the file. If you specify this parameter, you must specify Email for the Type parameter.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies a semicolon-separated list of email addresses for the recipients of an email. Valid email addresses are an administrator email account or the owner of the file. If you specify this parameter, you must specify Email for the Type parameter.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the computer account type under which the executable program or script runs. The acceptable values for this parameter are:
- LocalService
- NetworkService
- LocalSystem
The default value is LocalService. If you specify this parameter, you must specify Command for the Type parameter.
Type: FmjNotificationActionSecurityLevelEnum
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: LocalService
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the subject of an email. The maximum size of a subject is 1 KB. If you specify this parameter, you must specify Email for the Type parameter.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the maximum number of concurrent operations that can be established to run the cmdlet.
If this parameter is omitted or a value of 0
is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer.
The throttle limit applies only to the current cmdlet, not to the session or to the computer.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the type of notification action. The acceptable values for this parameter are:
- Event
- Command
Type: FmjNotificationActionTypeEnum
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the working directory in which the executable 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.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False