COMMAND EVERYTHING.
Returns an FSRM action object.
Microsoft FileServerResourceManager reference: Returns an FSRM action object. 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-FsrmAction. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Windows / FileServerResourceManager · Windows Server 2025 documentation; feature/module prerequisites apply
-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.
-Body- Specifies the content of an email. If you specify this parameter, you must set Email or Event Specify 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 full path to the program or script. If you specify this parameter, you must set Command for the *Type* parameter.
-CommandParameters- Specifies the parameters for the program or script. If you specify this parameter, you must set Command for the *Type* parameter.
-Confirm- Prompts you for confirmation before running the cmdlet.
-EventType- Specifies the event type of the action. If you specify this parameter, you must set Event for the *Type* parameter. The acceptable values for this parameter are: - None - Information - Warning - Error
-KillTimeOut- Specifies the timeout period, in minutes, after which the process that the action created is ended. Specify the default, -1, to indicate that the server does not end the process. If you specify this parameter, you must set Command for the *Type* parameter.
-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 set 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 set 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 set Email for the *Type* parameter.
-ReportTypes- Specifies an array of report types that the action generates. If you specify this parameter, you must set Report for the *Type* parameter. The acceptable values for this parameter are: - DuplicateFiles - FilesByFileGroup - FilesByOwner - FilesByProperty - LargeFiles - LeastRecentlyAccessed - MostRecentlyAccessed - QuotaUsage
-RunLimitInterval- Specifies the minimum interval, in minutes, before the server can run the action again. For example, if the interval expired since the action last ran, the server runs the action again in response to an event; otherwise, the server cannot run the action again. The default value, 60, specifies that there is no limit.
-SecurityLevel- Specifies the computer account type under which the program or script runs. The acceptable values for this parameter are: - LocalService - NetworkService - LocalSystem
-ShouldLogError- Indicates that the server records errors codes from running commands in the event log.
-Subject- Specifies the subject of an email. The maximum size of a subject is 1 KB. If you specify this parameter, you must set 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 the action. This setting determines the action that the server takes in response to a quota or file screen event. The acceptable values for this parameter are: - Email - Event - Command - Report
-WhatIf- Shows what would happen if the cmdlet runs. The cmdlet is not run.
-WorkingDirectory- Specifies the working directory in which the program or script runs. You must specify a valid path to a folder. FSRM does not support paths to remote computers.
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.
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.