Skip to content

Added install from mar instructions #3486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs-conceptual/azps-13.2.0/install-azps-optimized.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,31 @@ The following example installs the **AzPreview** module using **PSResourceGet**.
Install-PSResource -Name AzPreview
```

## Install from the Microsoft Artifact Registry

Installing the **Az** PowerShell module from the Microsoft Artifact Registry (MAR) offers faster,
more reliable installations. MAR ensures quick download speeds and a smooth setup process,
minimizing potential issues during installation.

1. If you're using a version of PowerShell earlier than 7.5.0, you must install
**Microsoft.PowerShell.PSResourceGet** version 1.1.0 or higher

```powershell
Install-Module -Name Microsoft.PowerShell.PSResourceGet -Repository PSGallery
```

1. Register MAR as a repository in **PSResourceGet** on your system

```powershell
Register-PSResourceRepository -Name MAR -Uri https://mcr.microsoft.com -ApiVersion ContainerRegistry
```

1. Install the **Az** PowerShell Module from MAR using **PSResourceGet**

```powershell
Install-PSResource -Name Az -Repository MAR
```

## Benefits of optimizing the installation process

By adopting a more selective and efficient installation process, you:
Expand All @@ -129,6 +154,7 @@ To learn more about managing your Azure resources with the **Az** PowerShell mod
[Get Started with Azure PowerShell][get-started-azps].

<!-- link references -->

[execution-policies]: /powershell/module/microsoft.powershell.core/about/about_execution_policies
[install-psresourceget]: /powershell/gallery/powershellget/install-powershellget#install-microsoftpowershellpsresourceget
[install-psresource]: /powershell/module/microsoft.powershell.psresourceget/install-psresource
Expand Down