Does your code import the PSCloudShellUtility module? If it does, remove that line and let the cloud shell load it.
https://learn.microsoft.com/en-us/answers/questions/1055859/azure-powershell-error-when-open
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to authenticate to azure active directory using following command
Connect-AzureAD -Confirm
However i am unable to connect . I get following error message.
The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.
Invoke-CloudShellTelemetry -LogLabel "CONNECTAZUREADSERVICE" -StartTime $startTime
Does your code import the PSCloudShellUtility module? If it does, remove that line and let the cloud shell load it.
https://learn.microsoft.com/en-us/answers/questions/1055859/azure-powershell-error-when-open