Returns a notification action object for file management jobs.
Windows Server · Risk: High · Documentation Verified
Last verified: 2026-10-26
Microsoft FileServerResourceManager reference: Returns a notification action object for file management jobs. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for New-FsrmFmjNotificationAction. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / FileServerResourceManager · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-AsJob
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell background jobs, see about_Jobs.
-AttachmentFileListSize
Specifies the maximum number of files that the list can include.
-Body
Specifies the content of an email. If you specify this parameter, you specify Email or Event for the *Type* parameter.
-CimSession
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-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
-Command
Specifies the command that the action runs. If you specify a command, you must specify Custom for the *Type* parameter.
-CommandParameters
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.
-Confirm
Prompts you for confirmation before running the cmdlet.
-EventType
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
-MailBCC
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.
-MailCC
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.
-MailTo
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.
-SecurityLevel
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.
-Subject
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.
-ThrottleLimit
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 (required)
Specifies the type of notification action. The acceptable values for this parameter are: - Email - Event - Command
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
-WorkingDirectory
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.
Prerequisites
Windows with the FileServerResourceManager module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.
Examples
Example 1: Create an email notification 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
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. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.