Hi I want t run PowerShell on my Ubuntu machine and also add support for Azure. Because soon I will try to set up some federation in Azure.
Below is from Microsoft
It is in Swedish but It says that Ubuntu 20.04 is not supported. I will be supported in the 7.1 release. The screenshot is from 2020-10-20
Star a terminal and run the command:
snap install powershell --classic
The run powershell
Then we want to add support for AzureAD with this command:
Then register this gallery
Register-PackageSource -Trusted -ProviderName 'PowerShellGet' -Name 'Posh Test Gallery' -Location https://www.poshtestgallery.com/api/v2/
Then we add the AzureAD module
Then we import the module
Then we connect to AureAD
Then we open a browser and surf to https://microsoft.com/devicelogin and put in the code that you receive from above command.
Choose the account that you want to login to
You are in! You think!
But it will not work with standard PowerShell.
I just wanted to see how many read this far. Sure get pissed, but if I did the mistake you can handle it!
The only think you need to do different is run powershell preview instead. Thats all, I promise!
sudo snap install powershell-preview --classic
Now yo can run Azure commands like
I hope I help someone out the with Ubuntu that want to work with Powershell!
Have a nice day!