Skip to content

Commit 48f93ca

Browse files
authored
Merge pull request #301213 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/azure-docs (branch main)
2 parents f22efc7 + 6dd3158 commit 48f93ca

File tree

1 file changed

+61
-4
lines changed

1 file changed

+61
-4
lines changed

articles/governance/machine-configuration/how-to/develop-custom-package/1-set-up-authoring-environment.md

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Support for applying configurations through machine configuration is introduced
2424

2525
Operating systems where the module can be installed:
2626

27-
- Ubuntu 18 or higher
27+
- Ubuntu 20
2828
- Windows
2929

3030
The module can be installed on a machine running PowerShell 7.x. Install the versions of PowerShell
@@ -33,15 +33,47 @@ listed in the following table for your operating system.
3333
| OS | Minimum Required PowerShell Version | Installation |
3434
|------------|:-----------------------------------:|----------------------------------------|
3535
| Windows | `7.1.3` | [Installing PowerShell on Windows][01] |
36-
| Ubuntu 18+ | `7.2.4` | [Installing PowerShell on Ubuntu][02] |
36+
| Ubuntu 20 | `7.2.4` | [Installing PowerShell on Ubuntu][02] |
37+
38+
For Linux, the following shell script downloads and installs PowerShell 7.2.4.
39+
40+
```sh
41+
###################################
42+
# Prerequisites
43+
44+
# Update the list of packages
45+
sudo apt-get update
46+
47+
# Install pre-requisite packages.
48+
sudo apt-get install -y wget
49+
50+
# Download the PowerShell package file
51+
wget https://github.com/PowerShell/PowerShell/releases/download/v7.2.4/powershell_7.2.4-1.deb_amd64.deb
52+
53+
###################################
54+
# Install the PowerShell package
55+
sudo dpkg -i powershell_7.2.4-1.deb_amd64.deb
56+
57+
# Resolve missing dependencies and finish the install (if necessary)
58+
sudo apt-get install -f
59+
60+
# Delete the downloaded package file
61+
rm powershell_7.2.4-1.deb_amd64.deb
62+
63+
# Switch the user to root before launching PowerShell
64+
sudo su
65+
66+
# Start PowerShell
67+
pwsh
68+
```
3769

3870
The **GuestConfiguration** module requires the following software:
3971

4072
- Azure PowerShell 5.9.0 or higher. The required Az PowerShell modules are installed automatically
4173
with the **GuestConfiguration** module, or you can follow [these instructions][03].
4274

4375

44-
### Install the module from the PowerShell Gallery
76+
### Install the GuestConfiguration module from the PowerShell Gallery
4577

4678
To install the **GuestConfiguration** module on either Windows or Linux, run the following command
4779
in PowerShell 7.
@@ -55,7 +87,32 @@ Validate that the module has been imported:
5587

5688
```powershell
5789
# Get a list of commands for the imported GuestConfiguration module
58-
Get-Command -Module 'GuestConfiguration'
90+
Get-Command -Module GuestConfiguration
91+
```
92+
93+
### Install the PSDesiredStateConfiguration module from the PowerShell Gallery
94+
95+
On Windows, to install the **PSDesiredStateConfiguration** module, run the following command in PowerShell 7.
96+
97+
```powershell
98+
# Install PSDesiredStateConfiguration version 2.0.7 (the stable release)
99+
Install-Module -Name PSDesiredStateConfiguration -RequiredVersion 2.0.7
100+
Import-Module -Name PSDesiredStateConfiguration
101+
```
102+
103+
On Linux, to install the **PSDesiredStateConfiguration** module, run the following command in PowerShell 7.
104+
105+
```powershell
106+
# Install PSDesiredStateConfiguration prerelease version 3.0.0
107+
Install-Module -Name PSDesiredStateConfiguration -RequiredVersion 3.0.0-beta1 -AllowPrerelease
108+
Import-Module -Name PSDesiredStateConfiguration
109+
```
110+
111+
Validate that the module has been imported:
112+
113+
```powershell
114+
# Get a list of commands for the imported PSDesiredStateConfiguration module
115+
Get-Command -Module PSDesiredStateConfiguration
59116
```
60117

61118
## Next step

0 commit comments

Comments
 (0)