{"id":53428,"date":"2026-10-12T14:28:46","date_gmt":"2026-10-12T04:28:46","guid":{"rendered":"https:\/\/www.cloudproinc.com.au\/?p=53428"},"modified":"2026-10-12T14:28:46","modified_gmt":"2026-10-12T04:28:46","slug":"run-azure-powershell-cmdlets-using-docker-containers","status":"publish","type":"post","link":"https:\/\/www.cloudproinc.com.au\/index.php\/2026\/10\/12\/run-azure-powershell-cmdlets-using-docker-containers\/","title":{"rendered":"Run Azure PowerShell cmdlets using Docker Containers"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In this blog post, we\u2019ll show you how to run Azure PowerShell cmdlets using Docker containers.<\/p>\n\n\n\n<!--more-->\n\n\n\n<div class=\"wp-block-yoast-seo-table-of-contents yoast-table-of-contents\"><h2>Table of contents<\/h2><ul><li><a href=\"#h-prerequisites\" data-level=\"2\">Prerequisites<\/a><\/li><li><a href=\"#h-pull-the-azure-powershell-docker-image\" data-level=\"2\">Pull the Azure PowerShell Docker Image<\/a><\/li><li><a href=\"#h-run-the-container-and-connect-to-azure\" data-level=\"2\">Run the Container and Connect to Azure<\/a><\/li><li><a href=\"#h-running-scripts-from-your-local-machine\" data-level=\"2\">Running Scripts from Your Local Machine<\/a><\/li><\/ul><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/category\/azure-powershell\/\">Azure PowerShell<\/a> provides a familiar PowerShell interface to manage <a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/category\/microsoft-azure\/\">Azure<\/a> resources and infrastructure. It enables you to automate tasks, provision resources, and integrate scripting into CI\/CD pipelines in Azure DevOps. As of its version 14 release, Azure PowerShell supports 100% of all Azure services, giving organizations the ability to automate business processes and reduce manual operations via the Azure portal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Running Azure PowerShell from a Docker container offers several key benefits:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>No local installation required<\/strong>: Azure PowerShell runs from an isolated Docker image, eliminating the need to install or manage it locally.<\/li>\n\n\n\n<li><strong>Support for multiple versions<\/strong>: You can run different versions of Azure PowerShell in containers, which is helpful when newer versions lack support for specific cmdlets.<\/li>\n\n\n\n<li><strong>Always up to date<\/strong>: The image runs the latest stable release by default.<\/li>\n\n\n\n<li><strong>Multi-environment support<\/strong>: Easily manage multiple Azure environments without repeatedly signing in and out.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-prerequisites\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To get started, ensure you have the following installed:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>WSL<\/strong> (Windows Subsystem for Linux) for Windows users<\/li>\n\n\n\n<li><strong>Docker Desktop<\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"557\" data-src=\"\/wp-content\/uploads\/2025\/06\/image-4-1024x557.png\" alt=\"\" class=\"wp-image-53429 lazyload\" data-srcset=\"\/wp-content\/uploads\/2025\/06\/image-4-1024x557.png 1024w, \/wp-content\/uploads\/2025\/06\/image-4-300x163.png 300w, \/wp-content\/uploads\/2025\/06\/image-4-768x417.png 768w, \/wp-content\/uploads\/2025\/06\/image-4-1080x587.png 1080w, \/wp-content\/uploads\/2025\/06\/image-4-980x533.png 980w, \/wp-content\/uploads\/2025\/06\/image-4-480x261.png 480w, \/wp-content\/uploads\/2025\/06\/image-4.png 1159w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/557;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-pull-the-azure-powershell-docker-image\">Pull the Azure PowerShell Docker Image<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Download the official <a href=\"https:\/\/github.com\/Azure\/azure-powershell\/blob\/main\/docker\/Dockerfile-ubuntu-20.04\" target=\"_blank\" rel=\"noreferrer noopener\">Azure PowerShell Docker<\/a> image with:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-1\"><code>docker pull mcr.microsoft.com\/azure-powershell:latest<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-run-the-container-and-connect-to-azure\">Run the Container and Connect to Azure<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Launch a container using:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-2\"><code>docker run -it mcr.microsoft.com\/azure-powershell:latest<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once inside the container, authenticate with Azure:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-3\"><code>Connect-AzAccount -UseDeviceAuthentication<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can now begin executing Azure PowerShell commands.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-running-scripts-from-your-local-machine\">Running Scripts from Your Local Machine<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To run scripts stored on your local machine, mount a folder into the container:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-4\"><code>docker run -it --rm -v C:\\\\localfolder:\/data mcr.microsoft.com\/azure-powershell:latest<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Inside the container, the mounted folder will appear at <code>\/data<\/code>, allowing access to your local scripts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using Docker to run Azure PowerShell is a simple and powerful way to streamline automation without cluttering your local development environment.<\/p>\n\n\n\n<ul class=\"wp-block-yoast-seo-related-links yoast-seo-related-links\">\n<li><a href=\"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2025\/06\/25\/containerize-a-blazor-net-application\/\">Containerize a Blazor .NET Application<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2024\/07\/25\/deploy-azure-openai-gpt-4o-resource-and-model-using-bicep\/\">Deploy Azure OpenAI GPT-4o Resource and Model using Bicep<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2024\/07\/25\/assigning-local-admins-to-windows-11-through-intune\/\">Assigning Local Admins to Windows 11 through Intune<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2025\/01\/28\/running-c-net-applications-in-azure-devops-pipelines\/\">Running C# .NET Applications in Azure DevOps Pipelines<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/cloudproinc.com.au\/index.php\/2024\/03\/28\/how-to-add-a-registry-key-to-windows-11-using-microsoft-intune\/\">How to Add a Registry Key to Windows 11 Using Microsoft Intune<\/a><\/li>\n<\/ul>\n\n\n<div class=\"wp-block-jetpack-subscriptions__supports-newline wp-block-jetpack-subscriptions\">\n\t\t<div>\n\t\t\t<div>\n\t\t\t\t<div>\n\t\t\t\t\t<p >\n\t\t\t\t\t\t<a href=\"https:\/\/www.cloudproinc.com.au\/?post_type=post&#038;p=53428\" style=\"font-size: 16px;padding: 15px 23px 15px 23px;margin: 0; margin-left: 10px;border-radius: 0px;border-width: 1px; background-color: #113AF5; color: #FFFFFF; text-decoration: none; white-space: nowrap; margin-left: 0\">Subscribe<\/a>\n\t\t\t\t\t<\/p>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\t<\/div>","protected":false},"excerpt":{"rendered":"<p>In this blog post, we\u2019ll show you how to run Azure PowerShell cmdlets using Docker containers.<\/p>\n","protected":false},"author":1,"featured_media":53430,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[16,20,13,70],"tags":[],"class_list":["post-53428","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-azure","category-azure-powershell","category-blog","category-docker"],"jetpack-related-posts":[{"id":53439,"url":"https:\/\/www.cloudproinc.com.au\/index.php\/2026\/10\/12\/use-dev-containers-for-net-development\/","url_meta":{"origin":53428,"position":0},"title":"Use Dev Containers for .NET Development","author":"CPI Staff","date":"October 12, 2026","format":false,"excerpt":"In this blog post, we\u2019ll show you how to use Dev Containers for .NET development. Table of contentsWhy Use Dev Containers?RequirementsGetting StartedDevelopment in a Dev ContainerSummary The VS Code Dev Containers extension allows you to develop .NET and other applications inside a containerized environment that is isolated from your host\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/www.cloudproinc.com.au\/index.php\/category\/net\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/05\/Add-Bootstrap-icons-dc.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/05\/Add-Bootstrap-icons-dc.png 1x, \/wp-content\/uploads\/2025\/05\/Add-Bootstrap-icons-dc.png 1.5x, \/wp-content\/uploads\/2025\/05\/Add-Bootstrap-icons-dc.png 2x, \/wp-content\/uploads\/2025\/05\/Add-Bootstrap-icons-dc.png 3x, \/wp-content\/uploads\/2025\/05\/Add-Bootstrap-icons-dc.png 4x"},"classes":[]},{"id":53466,"url":"https:\/\/www.cloudproinc.com.au\/index.php\/2026\/10\/12\/top-vs-code-extensions-for-developers-and-devops-engineers\/","url_meta":{"origin":53428,"position":1},"title":"Top VS Code Extensions for Developers and DevOps Engineers","author":"CPI Staff","date":"October 12, 2026","format":false,"excerpt":"If you're searching for the Top VS Code Extensions for Developers and DevOps Engineers, you've come to the right place. Visual Studio Code (VS Code) has become one of the most popular editors for modern software development due to its speed, flexibility, and the massive ecosystem of extensions. In this\u2026","rel":"","context":"In &quot;Blog&quot;","block_context":{"text":"Blog","link":"https:\/\/www.cloudproinc.com.au\/index.php\/category\/blog\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/07\/image-13.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/07\/image-13.png 1x, \/wp-content\/uploads\/2025\/07\/image-13.png 1.5x, \/wp-content\/uploads\/2025\/07\/image-13.png 2x"},"classes":[]},{"id":231,"url":"https:\/\/www.cloudproinc.com.au\/index.php\/2026\/10\/12\/how-to-add-a-registry-key-to-windows-11-using-microsoft-intune\/","url_meta":{"origin":53428,"position":2},"title":"How to Add a Registry Key to Windows 11 Using Microsoft Intune","author":"CPI Staff","date":"October 12, 2026","format":false,"excerpt":"In this article, we'll guide you through the process of adding a registry key to Windows 11 utilizing Microsoft Intune. Estimated reading time: 2 minutes Table of contentsListen to articlePowerShell Script:Adding Script to Intune:Related Articles Listen to article As businesses increasingly embrace cloud-based solutions, the necessity for streamlined and centralized\u2026","rel":"","context":"In &quot;Blog&quot;","block_context":{"text":"Blog","link":"https:\/\/www.cloudproinc.com.au\/index.php\/category\/blog\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2024\/03\/WindowsReg.webp","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2024\/03\/WindowsReg.webp 1x, \/wp-content\/uploads\/2024\/03\/WindowsReg.webp 1.5x, \/wp-content\/uploads\/2024\/03\/WindowsReg.webp 2x"},"classes":[]},{"id":53432,"url":"https:\/\/www.cloudproinc.com.au\/index.php\/2026\/10\/12\/automate-app-development-with-openais-codex\/","url_meta":{"origin":53428,"position":3},"title":"Automate App Development with OpenAI&#8217;s Codex","author":"CPI Staff","date":"October 12, 2026","format":false,"excerpt":"In this blog post, we explore how to automate app development with OpenAI's Codex. Table of contentsWhat is Codex?Requirements to Use CodexAutomate App Development with OpenAI's CodexUsing Codex with TasksReviewing Codex Pull RequestsFinal Thoughts Codex is an AI development agent that enables developers to manage and enhance projects through natural\u2026","rel":"","context":"In &quot;Blog&quot;","block_context":{"text":"Blog","link":"https:\/\/www.cloudproinc.com.au\/index.php\/category\/blog\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/07\/codex-datacentre-image.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/07\/codex-datacentre-image.png 1x, \/wp-content\/uploads\/2025\/07\/codex-datacentre-image.png 1.5x, \/wp-content\/uploads\/2025\/07\/codex-datacentre-image.png 2x"},"classes":[]},{"id":644,"url":"https:\/\/www.cloudproinc.com.au\/index.php\/2026\/10\/12\/identify-azure-users-without-mfa-using-powershell\/","url_meta":{"origin":53428,"position":4},"title":"Identify Azure Users Without MFA Using PowerShell","author":"CPI Staff","date":"October 12, 2026","format":false,"excerpt":"This Microsoft Azure post will show how to Identify Azure users without MFA Using PowerShell. If you are a Microsoft Azure customer and recently logged into the Microsoft Azure portal, you have probably seen the notification that from October 15th, 2024, Azure will enforce MFA for all users. This change\u2026","rel":"","context":"In &quot;Azure&quot;","block_context":{"text":"Azure","link":"https:\/\/www.cloudproinc.com.au\/index.php\/category\/microsoft-azure\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2024\/09\/Identify-Azure-Users-Without-MFA-Using-PowerShell.webp","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2024\/09\/Identify-Azure-Users-Without-MFA-Using-PowerShell.webp 1x, \/wp-content\/uploads\/2024\/09\/Identify-Azure-Users-Without-MFA-Using-PowerShell.webp 1.5x, \/wp-content\/uploads\/2024\/09\/Identify-Azure-Users-Without-MFA-Using-PowerShell.webp 2x"},"classes":[]},{"id":369,"url":"https:\/\/www.cloudproinc.com.au\/index.php\/2026\/10\/12\/list-classic-azure-administrators-using-powershell-and-azure-rest-api\/","url_meta":{"origin":53428,"position":5},"title":"List Classic Azure Administrators Using PowerShell and Azure REST API","author":"CPI Staff","date":"October 12, 2026","format":false,"excerpt":"This Microsoft Azure article will show how to list classic Azure Administrators using PowerShell and Azure REST API. As an IT consultancy company that helps companies safeguard their Azure tenant, we perform many tenant assessments. As part of our identity and access review, we always check how many users have\u2026","rel":"","context":"In &quot;Azure&quot;","block_context":{"text":"Azure","link":"https:\/\/www.cloudproinc.com.au\/index.php\/category\/microsoft-azure\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2024\/07\/AzureAdmins.webp","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2024\/07\/AzureAdmins.webp 1x, \/wp-content\/uploads\/2024\/07\/AzureAdmins.webp 1.5x, \/wp-content\/uploads\/2024\/07\/AzureAdmins.webp 2x, \/wp-content\/uploads\/2024\/07\/AzureAdmins.webp 3x, \/wp-content\/uploads\/2024\/07\/AzureAdmins.webp 4x"},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"\/wp-content\/uploads\/2025\/06\/run-auzre-powershell-using-docker.png","_links":{"self":[{"href":"https:\/\/www.cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/posts\/53428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=53428"}],"version-history":[{"count":1,"href":"https:\/\/www.cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/posts\/53428\/revisions"}],"predecessor-version":[{"id":53431,"href":"https:\/\/www.cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/posts\/53428\/revisions\/53431"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/media\/53430"}],"wp:attachment":[{"href":"https:\/\/www.cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=53428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/categories?post=53428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/tags?post=53428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}