The first step in implementing an IT policy extension is to add it to Ansys Access on Microsoft Azure, making it available to be configured for deployment.
On the main toolbar, click to display the Administration menu.
In the navigation pane, select IT policy extensions.
On the IT policy extensions page, click Add IT policy
extension.
In the Add Policy Extension dialog:
For Script type, select either Windows PowerShell
(.ps1) or Linux Bash (.sh).
Note: Make sure that PowerShell scripts use CRLF for
line endings, and Bash scripts use LF for line endings.
Specify the script to be run in one of two ways:
If the script is confidential and you do not want it to be stored outside of
your organization's Azure environment, enable IT policy
extension is confidential and then specify the full path of the script
file in the Script location (URL) field.
If the script is not confidential, click Upload and
then select the script to upload to Ansys Access on Microsoft Azure. The content of the
selected script is loaded into the preview window.
Note: In the preview window, the script is read-only and cannot be
edited.
If the script is a Linux Bash Shell (.sh) script, specify the resource types to
which the policy should be applied: Virtual desktops and/or
Autoscaling clusters (head node).
Windows PowerShell (.ps1) scripts apply to Windows virtual desktops only.
In the Name field, specify a name for the IT policy
extension which makes it easy to identify.
Under Advanced options, optionally specify the following
settings:
Timeout limit (seconds). The maximum time the script is
allowed to run before it is stopped. If a timeout occurs, another attempt may be
made if there are retry attempts remaining.
Retry attempts. The maximum number of times to retry
running the script should the initial attempt fail.
Description. An optional description of the IT policy
extension. If a description is specified, an info icon will be displayed next to the
policy extension name on the IT policy extensions page.
When a user moves their cursor over the icon, the description is displayed.
Review or specify script parameters:
If you uploaded a script, any parameters defined in the script are extracted
and displayed in the Parameters section. For
example:
If you are using a confidential script that is stored remotely, Ansys Access on Microsoft Azure is unable to extract parameters from the script. You must
manually add parameters that you want to use for script execution. To add a
parameter, click Add Parameter and then specify the
parameter name.
Note: Input values for named parameters are
specified when you create a configuration that uses the IT policy extension.
Click Add.
The addition is confirmed.
To deploy the IT policy extension when a resource is created, you must create a
configuration that uses the IT policy extension. To proceed with creating a
configuration, click Go to configurations. For guidance on
creating a configuration, see Configuring the Deployment of IT Policy Extensions.