loading...
Cover image for Azure Cloud Shell: Use PowerShell in Bash

Azure Cloud Shell: Use PowerShell in Bash

tidjani profile image Tidjani Belmansour, Ph.D. ・1 min read

A quick one today...

I quite often hear this complaint: "I hate having to switch Cloud Shell from Bash to PowerShell to use cmdlets.". Well, you don't have to!

In fact, you can invoke the PowerShell Core interpreter right from within the Bash command-line in Cloud Shell. Simply type:

pwsh

And you'll fire off the PowerShell Core interpreter.
start a powershell core session in bash

Once you're done and you want to go back to the Bash command-line, simply type:

exit

And you'll exit the PowerShell Core interpreter.
exit the powershell core session and go back to bash

Simple, isn't it? ;)

As a conclusion

Working with the command line is essential when it comes to automation. Knowing that you can combine the power of Bash and PowerShell together will help you do great things.

Let's keep in touch

You can reach me on Twitter or LinkedIn.

See you soon !

Posted on Jun 19 by:

tidjani profile

Tidjani Belmansour, Ph.D.

@tidjani

Hi, my name is Tidjani Belmansour. I'm a Microsoft Azure MVP, a Cloud Solutions Architect and a coffee addict. I've been in love with computers since 1988.

Discussion

markdown guide