Skip to content

Commit

Permalink
Added execution policy settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mikefrobbins committed Dec 11, 2024
1 parent 57e0987 commit 5bc949e
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions docs-conceptual/azps-13.0.0/install-azps-optimized.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,41 @@ PowerShell version 7.4.

## Prerequisites

Determine if the **PSResourceGet** PowerShell module is installed and install it if necessary. The
**PSResourceGet** module provides improved capabilities for installing PowerShell resources,
including Azure PowerShell modules. **PSResourceGet** is preinstalled with PowerShell version 7.4 or
higher and is also supported in Windows PowerShell 5.1.
1. On Windows systems, you must set the PowerShell execution policy to remote signed or less
restrictive

1. Determine if the **PSResourceGet** PowerShell module is installed.
- Check the PowerShell execution policy:

```powershell
Get-Module -Name Microsoft.PowerShell.PSResourceGet -ListAvailable
Get-ExecutionPolicy -List
```

1. Install the **PSResourceGet** PowerShell module.
- Set the PowerShell execution policy to remote signed:

```powershell
Install-Module -Name Microsoft.PowerShell.PSResourceGet -Repository PSGallery
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
```

For more information about execution policies, see
[about_Execution_Policies][execution-policies].

1. Determine if the **PSResourceGet** PowerShell module is installed and install it if necessary.
The **PSResourceGet** module provides improved capabilities for installing PowerShell resources,
including Azure PowerShell modules. **PSResourceGet** is preinstalled with PowerShell version 7.4
or higher and is also supported in Windows PowerShell 5.1.

- Determine if the **PSResourceGet** PowerShell module is installed.

```powershell
Get-Module -Name Microsoft.PowerShell.PSResourceGet -ListAvailable
```
- Install the **PSResourceGet** PowerShell module.
```powershell
Install-Module -Name Microsoft.PowerShell.PSResourceGet -Repository PSGallery
```
## The Az PowerShell module
Azure PowerShell is the product name for the collection of official Microsoft PowerShell modules for
Expand Down Expand Up @@ -111,6 +129,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
[get-started-azps]: get-started-azureps.md

0 comments on commit 5bc949e

Please sign in to comment.