What is Azure Cloud PowerShell?
Azure cloud shell provides browser access to azure from anywhere, the shell gives users a wealthy environment of tool that gets updated/maintained by Microsoft. Currently Azure Cloud shell has two different environments, these environments can be accessed via the Azure portal, a dedicated URL, Azure documentation, Visual Studio code via the Azure Account Extension option as well as the Azure App.
These environments are:
- Bash in Cloud Shell – This runs Bash shell on the operating system Ubuntu (Linux), this was made available back in November 2017.
- PowerShell in the Cloud Shell – This runs Windows PowerShell 5.1 on Windows Server Core which was also made available back in November 2017.
What are the changes?
Faster starting time:
Microsoft have acknowledged that the current start up time for Azure Cloud shell is below the speed that users expect. To remediate this Microsoft have been working to make significant improvements to speed up the start up time for the Powershell experience as well as the ‘Bash’ shell by a major amount.
Default to PowerShell Core 6:
In January of 2018 the PowerShell 6 core was released for public availability. With the popularity of PowerShell Core 6 growing Microsoft have decided to make it the default experience in Cloud Shell. To help support and manage Azure resources all of the Azure PowerShell modules are scheduled to be supported on PowerShell Core 6.
Consistent Tool Availability:
For Microsoft to ensure the best command line tools experience while using the Azure Cloud Shell it has been decided that it will be switching to a Linux container running PowerShell Core 6. By making this change it will ensure a consistent toolset experience across the PowerShell and Bash experiences in the Cloud Shell.
Persistent Tool Settings:
In addition to the feature of saving any of your modules and scripts to the Cloud Drive Microsoft have made persistent available tools available. These tools include ‘Git’ and ‘SSH’, these will be automatically saved to your Cloud Drive. By using these tools it will remove the necessity for any additional set up for these tools which at present is currently still required.
How do the changes affect my PowerShell experience?
By default the PowerShell experience will now be case sensitive meaning that you can have files with similar names in the same folder (e.g. Test, test and TEST). This means that users will now have to be more careful when making file system changes.
Some aliases that were on Windows such as ‘Is’ and ‘Sleep’ that are mapped to built-in UNIX commands will no longer function as before.
The modules I use are not supported in PowerShell Core 6, what can I do about this?
Currently this is still being worked on by Microsoft, they are working with the module owners to put them into .NET Core. Some modules such as AzureRM are currently complete however there is still a lot more to be done, they are currently being prioritised by the current usage and there is currently no estimated completion date.
What will happen to the Cloud shell based on Windows?
In the Azure Cloud Shell Microsoft have announced that there will no longer be a windows based experience. Because most of the operations from the shell happen against the endpoints Microsoft see little point needing to manage things in the OS side; the swapping of the OS should have a minimal impact. Cloud Drive however will still be available to use across both experiences and as such Microsoft recommend to continue to use this as the primary place to save your work.
Is there any difference between the Bash and PowerShell experiences?
the short answer is no, because both of the experiences will now run the same OS the tool set will be the same. Microsoft have made it so that you can start the PowerShell experience by running ‘pwsh’ as well as from the PowerShell experience you will be able to start the Bash experience by running ‘Bash’.