New-RASNotificationScript
SYNOPSIS
Creates new notification script.
SYNTAX
New-RASNotificationScript -Command <string> -Name <string> [-Arguments <string>]
[-InitialDirectory <string>] [-Password <SecureString>] [-SiteId <uint>] [-Username <string>]
[<CommonParameters>]New-RASNotificationScript -Password <SecureString> -Username <string> [<CommonParameters>]DESCRIPTION
A script can be attached to any of the notifications.
EXAMPLES
Example 1
New-RASNotificationScript -Name "scriptName" -Command "myscript.py" -Arguments "(`$HOSTPOOL) (`$CA)" -InitialDirectory "C:\" -Username "Administrator"Creates a new notification script which runs as 'Administrator' user.
When 'Username' parameter is specified a password will be prompted.
Example 2
Creates a new notification script which runs as 'Administrator' user.
PARAMETERS
-Name
Script name.
-SiteId
Site ID
If the parameter is omitted, the site ID of the Licensing Server will be used.
-Command
Command to execute when invoked.
-Arguments
Command arguments.
Possible values: ($CA), ($ENROLLMENTMETHOD), ($FARM-NAME), ($HOSTPOOL), ($LOCATION), ($NOTIFICATION-TIME), ($NOTIFICATION-TYPE), ($PROVIDER), ($RESOURCEGROUP), ($SERVER-ADDRESS), ($SITE-NAME), ($TENANTBROKER), ($TENANTNAME), ($THRESHOLD-DIRECTION), ($THRESHOLD-VALUE), ($TRIGGER-ADDRESS), ($WORKSPACE)
-InitialDirectory
Script base directory
-Username
Execute script as this system user.
-Password
System user password.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
None
OUTPUTS
NotificationScript
RELATED LINKS
Last updated