Invoke PoweShell Connect-AzureAd command Error

Got the Solution

“Set-ExecutionPolicy Unrestricted -Scope CurrentUser
$PathToPowerShell64bit = Get-ChildItem -Path $Env:Windir\WinSxS | Where-Object {$_.FullName -match ‘amd64_microsoft-windows-powershell-exe’}
$PowerShell64bitExe = Get-ChildItem -Path $PathToPowerShell64bit.FullName -Filter PowerShell.exe | Select-Object -ExpandProperty FullName
& $PowerShell64bitExe -file ‘Script Path’”

Script Path = C:\Test\Hello64.ps1’

1 Like