New-RASNotificationScript
Last updated
Last updated
New-RASNotificationScript
Creates new notification script.
New-RASNotificationScript - (string) - (string) [ (string)] [ (string)] [ (SecureString)] [ (uint)] [ (string)] [()]
New-RASNotificationScript - (SecureString) - (string) [()]
A script can be attached to any of the notifications.
Script name.
Site ID
If the parameter is omitted, the site ID of the Licensing Server will be used.
Command to execute when invoked.
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)
Script base directory
Execute script as this system user.
System user password.
(CommonParameters)
-none-
**---------- 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 ----------
New-RASNotificationScript -Name "scriptName" -Command "myscript.py" -Arguments "(`$HOSTPOOL) (`$CA)" -InitialDirectory "C:\ -Username "Administrator" -Password (ConvertTo-SecureString -String "abc" -AsPlainText -Force)
Creates a new notification script which runs as 'Administrator' user.