PowerShell scripts in Service Automation
Service Automation lets you run custom PowerShell code inside other objects, to perform actions and create integrations that are specific to your organization's needs.
PowerShell can be used in:
In your PowerShell scripts, you have access to relevant Service Automation variables.
PowerShell version
Most PowerShell scripts in Service Automation are executed by the Service Automation Agent.
The Cloud Service Automation Agent supports PowerShell 7 or later.
The On-premises Service Automation Agent service supports Windows PowerShell 5.1 by default. It can be configured to use PowerShell 7 or later.
Pre-defined tasks and Scheduled tasks are executed by the HelloID Directory Agent service, which supports Windows PowerShell 5.1.
Limitations
Importing a PowerShell module with the Cloud Service Automation Agent is not allowed.
If a script requires a PowerShell module, it must be executed via the On-premises Service Automation Agent service