How to install powershell from cloud shell?

carlos puello 0 Reputation points
2026-08-10T16:59:02.3133333+00:00

I have a free subscription, I need to configure powershell via cloud share, so that I can upload some template files to powershell to enable a VDI

Azure Virtual Desktop
Azure Virtual Desktop

A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.

0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-08-10T16:59:17.15+00:00

    Azure PowerShell does not need to be installed in Azure Cloud Shell. The Az PowerShell module is already preinstalled there.

    Use this approach:

    1. Open Azure Cloud Shell from the Azure portal or go to https://shell.azure.com.
    2. When prompted, select PowerShell.
    3. If this is the first launch, mount a storage account so files can persist between sessions.
    4. Upload template files by selecting Upload/Download files > Upload.
    5. Run PowerShell deployment commands from Cloud Shell.

    Example flow for template deployment in Cloud Shell:

    New-AzResourceGroup -Name ExampleGroup -Location "Central US"
    New-AzResourceGroupDeployment `
      -DeploymentName ExampleDeployment `
      -ResourceGroupName ExampleGroup `
      -TemplateFile azuredeploy.json `
      -storageAccountType Standard_GRS
    

    Important details:

    • Cloud Shell supports both Bash and PowerShell.
    • Azure PowerShell is preinstalled in Cloud Shell, so no local installation is required.
    • Cloud Shell stores files in the $HOME location by using a 5-GB file share when storage is configured.
    • Cloud Shell sessions time out after 20 minutes without interactive activity.
    • Cloud Shell runs PowerShell on a Linux container, so Windows-specific PowerShell features are not available there.

    If local installation is still needed instead of Cloud Shell, the Az PowerShell module can be installed on Windows, Linux, or macOS, and PowerShell 7 or higher is the recommended version.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.