I installed VSTS build agent on mac to build xamarin iOS project. Builds worked fine until I added powershell build step. Even though I installed powershell for mac (https://git
Things seem to have moved forward because I ran successfully today a PowerShell@2 task on a Mac Self-Hosted Agent from an Azure DevOps build pipeline.
By checking "Enable system diagnostics" when queuing the build, the log shows me that the task found itself the path to the PowerShell Core (pwsh) that I installed on my Mac with the help of Homebrew (brew cask install powershell - see https://docs.microsoft.com/fr-fr/powershell/scripting/install/installing-powershell-core-on-macos).