Azure Cloud Shell # PowerShell

Azure Cloud Shell -> Azure Cloud Shell is an interactive, authenticated, browser-accessible shell for managing Azure resources. It provides the flexibility of choosing the shell experience that best suits the way you work, either Bash or PowerShell.

Azure Cloud Shell Features -> 

1. Azure PowerShell can be launched directly from a portal and it is temporary.

2. Azure PowerShell provides an integrated graphical text editor.

3. Azure PowerShell authenticates directly so no need to enter login details again and again.

4. Azure PowerShell runs on a temporary host.

5. Azure PowerShell requires a resource group and storage account, When you launch Azure Cloud Shell and if you have not created a Storage account, One pop up will prompt and ask to create an account automatically.

6. Azure PowerShell uses the same Azure file share for both Bash and PowerShell. Bash for Linux users and PowerShell for Windows.

7. Azure PowerShell is assigned one machine per user.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKD-hg6TxjvOc13viAcCC_9Yv3F7LFRg94VnoIfIYrbE7zMQFQ_66tsw_RArMMvcizLJPvBmNxM1g0n6YbCrHRfABfQ8gJPvS8HTzA1bgR4PWnuBJFpEXwDnkn9Jewp3I9mIlZANpjI43M/w400-h225/image.png


Login to Azure Portal

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3Hp41Dh2BKC-c8W4W2_j7aaSah68IMbb31WmNcffFt3z5J2ZOtYsi8z_2CnOl4uqKqjyzgzI-YSRMM8T6xGar8URw4XNSGaGD2yiOFZwNM-tLiwOfI7KRlELPMw21aEwlrAufxYua0T-5/w400-h108/image.png

Click on PowerShell icon -> once you click on Cloud PowerShell icon one below page will open.


https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPUmOPOXXqD1hVveUtRIgdVB_Ncs0uEzAU8D66jRoLWBYl49dZMRZ7UZSiI4NQcukaW1lV69OriPanT-8zl7zho8oDh0WCLAYNEAVd0Pzj_ADhc4YdjAXAtC01fWdVs0G7I1-XMyaYloDf/w400-h156/image.png

If you want to open for windows , click PowerShell.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMQHkBqEwdUxMxsdQEScvnXaGAK0ZzIuhfKpp5IWnk0JK1aKfW_g_S6nXCHeNDr5aI4lIG7qZkXmkbfVamrFBCWSgfGNs20CSWLopbQjH_Gx3-aDIJNObbxGKLGD9JqXMeyOfWDeyeSUgI/w400-h161/image.png

One Storage account will be created if you don’t have an existing one.

It will take 2-3 minutes and PowerShell will launch.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHoWHF5IoQ1zpaTvTsYHrtbc6oUSLgjHfOb8dcFVd_FvYQKeApb4IofOkcY5CYnGP1ljhUOv4vp2afiOmHC80D0n_9L-RmY-2U22FzFz8SFdTm-Soz9jsZHLhtOmu1RSpNKd3AZEtE3Jkl/w400-h158/image.png


Later if you want to switch to Bash you can switch also you can re-launch PowerShell.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8RH8nYiOWRkzVWi9dVlNsuHr2u3BhTNKzivm-uwMEqNuOKFKVbXOCjF4dW-1xcllJJySTSWpcTZjgsUy7Bon9vVuuXzpRr9SRel-4_U0ht_Yg7bx7zhkiZG9HV8ZwCv5KOGQyZzszvWaM/w400-h165/image.png


Create Resource Group using CloudShell


To perform any activity on Azure CloudShell or PowerCli you need to login with your subscription ID.


Login to Azure Account -> To login Azure subscription use below command.


Login-AzAccount -UseDeviceAuthentication



Then Open the link below and enter the Authentication Code.


https://microsoft.com/devicelogin




Now close this page as Authentication has already done.



Use Below Command to Create a Resource Group.


New-AzResourceGroup -Name RG_PowerShell -Location 'EastUS'



Use Below Command to Get a list of created Resource Groups.


Get-AzResourceGroup




Use Below Command to Delete Resource Group


Remove-AzResourceGroup -Name RG_PowerShell


RG_PowerShell -> Resource Group Name













No comments:

Post a Comment

Featured Post

HPE MSA 2040 configuration step by step

HPE MSA 2040 configuration Default IP range for HP SAN storage MSA 2040 is 10.0.0.1/2 You need to connect your laptop and storage with...