I'm trying to run PowerShell script that has Connect-AzAccount command, from custom activity in azure data factory. But Connect-AzAccount is not recognized. I tried to import Az in PowerShell script that is in storage account, but getting below issue. Can someone let me know how to run Az commands that are in PowerShell from azure data factory custom activity
Import-Module : The specified module 'Az' was not loaded because no valid module file was found in
any module directory.
+ Import-Module Az
+ CategoryInfo : ResourceUnavailable: (Az:String) [Import-Module], FileNotFoundExcept
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCom
Connect-AzAccount : 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.