Skip to content

Commit 043c2ca

Browse files
committed
Best practice and styling corrections
1 parent 21a8dbd commit 043c2ca

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

articles/governance/machine-configuration/machine-configuration-azure-automation-migration.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Azure Automation State Configuration to machine configuration migration planning
33
description: This article provides process and technical guidance for customers interested in moving from DSC version 2 in Azure Automation to version 3 in Azure Policy.
4-
ms.date: 07/26/2022
4+
ms.date: 03/06/2023
55
ms.topic: how-to
66
ms.service: machine-configuration
77
ms.author: timwarner
@@ -81,15 +81,15 @@ Group where the Automation Account is deployed.
8181
Install the PowerShell module "Az.Automation".
8282

8383
```powershell
84-
Install-Module Az.Automation
84+
Install-Module -Name Az.Automation
8585
```
8686

87-
Next, use the "Get-AzAutomationAccount" command to identify your Automation
87+
Next, use the `Get-AzAutomationAccount` command to identify your Automation
8888
Accounts and the Resource Group where they're deployed.
89-
The properties "ResourceGroupName" and "AutomationAccountName"
89+
The properties **ResourceGroupName** and **AutomationAccountName**
9090
are important for next steps.
9191

92-
```powershell
92+
```azurepowershell
9393
Get-AzAutomationAccount
9494
9595
SubscriptionId : <your subscription id>
@@ -108,7 +108,7 @@ Discover the configurations in your Automation Account. The output
108108
contains one entry per configuration. If you have many, store the information
109109
as a variable so it's easier to work with.
110110

111-
```powershell
111+
```azurepowershell
112112
Get-AzAutomationDscConfiguration -ResourceGroupName <your resource group name> -AutomationAccountName <your automation account name>
113113
114114
ResourceGroupName : <your resource group name>
@@ -125,10 +125,10 @@ LogVerbose : False
125125
```
126126

127127
Finally, export each configuration to a local script file using the command
128-
"Export-AzAutomationDscConfiguration". The resulting file name uses the
128+
`Export-AzAutomationDscConfiguration`. The resulting file name uses the
129129
pattern `\ConfigurationName.ps1`.
130130

131-
```powershell
131+
```azurepowershell
132132
Export-AzAutomationDscConfiguration -OutputFolder /<location on your machine> -ResourceGroupName <your resource group name> -AutomationAccountName <your automation account name> -name <your configuration name>
133133
134134
UnixMode User Group LastWriteTime Size Name
@@ -145,7 +145,7 @@ To automate this process, pipe the output of each command above to the next.
145145
The example exports 5 configurations. The output pattern is
146146
the only indication of success.
147147

148-
```powershell
148+
```azurepowershell
149149
Get-AzAutomationAccount | Get-AzAutomationDscConfiguration | Export-AzAutomationDSCConfiguration -OutputFolder /<location on your machine>
150150
151151
UnixMode User Group LastWriteTime Size Name
@@ -195,17 +195,17 @@ the account.
195195

196196
For example, to create a list of all modules published to any of your accounts.
197197

198-
```powershell
199-
Get-AzAutomationAccount | Get-AzAutomationModule | ? IsGlobal -eq $false
198+
```azurepowershell
199+
Get-AzAutomationAccount | Get-AzAutomationModule | Where-Object IsGlobal -eq $false
200200
```
201201

202202
You can also use the PowerShell Gallery as an aid in finding details about
203203
modules that are publicly available. For example, the list of modules that are
204204
built in to new Automation Accounts, and that contain DSC resources, is produced
205205
by the following example.
206206

207-
```powershell
208-
Get-AzAutomationAccount | Get-AzAutomationModule | ? IsGlobal -eq $true | Find-Module -erroraction silentlycontinue | ? {'' -ne $_.Includes.DscResource} | Select Name, Version -Unique | format-table -AutoSize
207+
```azurepowershell
208+
Get-AzAutomationAccount | Get-AzAutomationModule | Where-Object IsGlobal -eq $true | Find-Module -ErrorAction SilentlyContinue | Where-Object {'' -ne $_.Includes.DscResource} | Select-Object -Property Name, Version -Unique | Format-Table -AutoSize
209209
210210
Name Version
211211
---- -------
@@ -232,8 +232,8 @@ the feed is registered in your local environment as a
232232
The `Find-Module` command in the example doesn't suppress errors, meaning
233233
any modules not found in the gallery return an error message.
234234

235-
```powershell
236-
Get-AzAutomationAccount | Get-AzAutomationModule | ? IsGlobal -eq $false | Find-Module | ? {'' -ne $_.Includes.DscResource} | Install-Module
235+
```azurepowershell
236+
Get-AzAutomationAccount | Get-AzAutomationModule | Where-Object IsGlobal -eq $false | Find-Module | Where-Object {'' -ne $_.Includes.DscResource} | Install-Module
237237
238238
Installing package xWebAdministration'
239239

0 commit comments

Comments
 (0)