Azure Orchestrator Installation Script For Identity Server Fails Due To Add-PSSnapin Not Recognized

Why is the Publish-IdentityServer.ps1 failing due To 'Add-PSSnapin' not being recognized?

Issue Description: Installation Scripts Fail Due To 'Add-PSSnapin' is not recognized as a name of a cmdlet, function, script file, or executable program.

Troubleshooting: Check the version of PowerShell currently being used by running the following command

  • Get-Host | Select-Object Version

Resolution: The PSSnapin is a required library that is bundled in the Web Deploy. If the version of PowerShell is 6.0 or above this error will occur due to the PSSnapin functionality being removed starting with PowerShell Core 6.

UiPath does not recommend to run using the core PowerShell, instead it should always be deployed using the Windows PowerShell.

Run the script using Windows PowerShell 4.0 or higher with .Net framework 4.7.2 or higher. Check the below links for more details on the prerequisites.