Invoke Powershell to connect to Azure Account

Hi All,

So i have a powershell script that works well from ISE. In this I am using Az module to connect to my azure account, then upload blobs and run pipeline to load data into my synapse table. All this works well when I run code from ISE. But when i use Invoke Powershell activity the process fails with the error:

Invoke Power Shell: The term ‘Connect-AzAccount’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I have all my modules installed as Administrator. I know that UiPath has official Azure Activities but those are limited and I have requirement to run pipeline, fetch run details and send it over email and so i cant use the official activities.

Also i checked that my modules are installed inside Program Files and not in System32 folder. Do i need to move them to system32?(While writing I already moved them)

Kindly let me know what can i do to resolve this.

Hi @ashishsinha1504 is the command only contains “Connect-AzAccount” or anything more is here?

Hi @NIVED_NAMBIAR,

There are lot of other commands as well inside it like get storage key, upload blob and invoke pipeline. But the error comes at the first command which is the connect one. So I tried to debug it and just wrote single line in invoke Powershell activity and it failed. Does it have to do with what the command return as output? Because when I ran write-host it worked but again when I write Get-Module it throws the same error.

Can i get some suggestions and help on how can i do this?