New-RASNotificationScript

NAME

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.

PARAMETERS

-Name <string> Script name.

        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

-SiteId <uint> Site ID

If the parameter is omitted, the site ID of the Licensing Server will be used.

        Required?                    false

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false

-Command <string> Command to execute when invoked.

        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

-Arguments <string> 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)

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

-InitialDirectory <string> Script base directory

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

-Username <string> Execute script as this system user.

        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

-Password <SecureString> System user password.

        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

<CommonParameters>

        This cmdlet supports the common parameters: Verbose, Debug,

        ErrorAction, ErrorVariable, WarningAction, WarningVariable,

        OutBuffer, PipelineVariable, and OutVariable. For more information, see 

        about_CommonParameters documentation. 

INPUTS

-none-

OUTPUTS

NotificationScript

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 ----------

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.

Last updated

© 2024 Parallels International GmbH. All rights reserved.