Skip to content

Commit b6a01dc

Browse files
authored
Update for Az Module
Updating the commands to reflect the most recent module
1 parent 10b5b5b commit b6a01dc

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

articles/automation/automation-dsc-compile.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,31 @@ determine when to use which method based on the characteristics of each:
3939

4040
### Azure PowerShell
4141

42-
You can use [`Start-AzureRmAutomationDscCompilationJob`](/powershell/module/azurerm.automation/start-azurermautomationdsccompilationjob)
42+
You can use [`Start-AzAutomationDscCompilationJob`](/powershell/module/az.automation/start-azautomationdsccompilationjob)
4343
to start compiling with Windows PowerShell. The following sample code starts compilation of a DSC configuration called **SampleConfig**.
4444

4545
```powershell
46-
Start-AzureRmAutomationDscCompilationJob -ResourceGroupName 'MyResourceGroup' -AutomationAccountName 'MyAutomationAccount' -ConfigurationName 'SampleConfig'
46+
Start-AzAutomationDscCompilationJob -ResourceGroupName 'MyResourceGroup' -AutomationAccountName 'MyAutomationAccount' -ConfigurationName 'SampleConfig'
4747
```
4848

49-
`Start-AzureRmAutomationDscCompilationJob` returns a compilation job object that you can use to
49+
`Start-AzAutomationDscCompilationJob` returns a compilation job object that you can use to
5050
track its status. You can then use this compilation job object with
51-
[`Get-AzureRmAutomationDscCompilationJob`](/powershell/module/azurerm.automation/get-azurermautomationdsccompilationjob)
51+
[`Get-AzAutomationDscCompilationJob`](/powershell/module/az.automation/get-azautomationdsccompilationjob)
5252
to determine the status of the compilation job, and
53-
[`Get-AzureRmAutomationDscCompilationJobOutput`](/powershell/module/azurerm.automation/get-azurermautomationdsccompilationjoboutput)
53+
[`Get-AzAutomationDscCompilationJobOutput`](/powershell/module/az.automation/get-azautomationdscconfiguration)
5454
to view its streams (output). The following sample code starts compilation of the **SampleConfig**
5555
configuration, waits until it has completed, and then displays its streams.
5656

5757
```powershell
58-
$CompilationJob = Start-AzureRmAutomationDscCompilationJob -ResourceGroupName 'MyResourceGroup' -AutomationAccountName 'MyAutomationAccount' -ConfigurationName 'SampleConfig'
58+
$CompilationJob = Start-AzAutomationDscCompilationJob -ResourceGroupName 'MyResourceGroup' -AutomationAccountName 'MyAutomationAccount' -ConfigurationName 'SampleConfig'
5959
6060
while($null -eq $CompilationJob.EndTime -and $null -eq $CompilationJob.Exception)
6161
{
62-
$CompilationJob = $CompilationJob | Get-AzureRmAutomationDscCompilationJob
62+
$CompilationJob = $CompilationJob | Get-AzAutomationDscCompilationJob
6363
Start-Sleep -Seconds 3
6464
}
6565
66-
$CompilationJob | Get-AzureRmAutomationDscCompilationJobOutput –Stream Any
66+
$CompilationJob | Get-AzAutomationDscCompilationJobOutput –Stream Any
6767
```
6868

6969
### Basic Parameters
@@ -124,7 +124,7 @@ $Parameters = @{
124124
'IsPresent' = $False
125125
}
126126
127-
Start-AzureRmAutomationDscCompilationJob -ResourceGroupName 'MyResourceGroup' -AutomationAccountName 'MyAutomationAccount' -ConfigurationName 'ParametersExample' -Parameters $Parameters
127+
Start-AzAutomationDscCompilationJob -ResourceGroupName 'MyResourceGroup' -AutomationAccountName 'MyAutomationAccount' -ConfigurationName 'ParametersExample' -Parameters $Parameters
128128
```
129129

130130
For information about passing PSCredentials as parameters, see [Credential Assets](#credential-assets) below.
@@ -201,7 +201,7 @@ $ConfigData = @{
201201
}
202202
}
203203
204-
Start-AzureRmAutomationDscCompilationJob -ResourceGroupName 'MyResourceGroup' -AutomationAccountName 'MyAutomationAccount' -ConfigurationName 'ConfigurationDataSample' -ConfigurationData $ConfigData
204+
Start-AzAutomationDscCompilationJob -ResourceGroupName 'MyResourceGroup' -AutomationAccountName 'MyAutomationAccount' -ConfigurationName 'ConfigurationDataSample' -ConfigurationData $ConfigData
205205
```
206206

207207
### Working with Assets in Azure Automation during compilation
@@ -275,7 +275,7 @@ $ConfigData = @{
275275
)
276276
}
277277
278-
Start-AzureRmAutomationDscCompilationJob -ResourceGroupName 'MyResourceGroup' -AutomationAccountName 'MyAutomationAccount' -ConfigurationName 'CredentialSample' -ConfigurationData $ConfigData
278+
Start-AzAutomationDscCompilationJob -ResourceGroupName 'MyResourceGroup' -AutomationAccountName 'MyAutomationAccount' -ConfigurationName 'CredentialSample' -ConfigurationData $ConfigData
279279
```
280280

281281
> [!NOTE]
@@ -319,17 +319,17 @@ in to the Azure State Configuration service.
319319

320320
### Importing a node configuration with Azure PowerShell
321321

322-
You can use the [Import-AzureRmAutomationDscNodeConfiguration](/powershell/module/azurerm.automation/import-azurermautomationdscnodeconfiguration)
322+
You can use the [Import-AzAutomationDscNodeConfiguration](/powershell/module/az.automation/import-azautomationdscnodeconfiguration)
323323
cmdlet to import a node configuration into your automation account.
324324

325325
```powershell
326-
Import-AzureRmAutomationDscNodeConfiguration -AutomationAccountName 'MyAutomationAccount' -ResourceGroupName 'MyResourceGroup' -ConfigurationName 'MyNodeConfiguration' -Path 'C:\MyConfigurations\TestVM1.mof'
326+
Import-AzAutomationDscNodeConfiguration -AutomationAccountName 'MyAutomationAccount' -ResourceGroupName 'MyResourceGroup' -ConfigurationName 'MyNodeConfiguration' -Path 'C:\MyConfigurations\TestVM1.mof'
327327
```
328328

329329
## Next steps
330330

331331
- To get started, see [Getting started with Azure Automation State Configuration](automation-dsc-getting-started.md)
332332
- To learn about compiling DSC configurations so that you can assign them to target nodes, see [Compiling configurations in Azure Automation State Configuration](automation-dsc-compile.md)
333-
- For PowerShell cmdlet reference, see [Azure Automation State Configuration cmdlets](/powershell/module/azurerm.automation/#automation)
333+
- For PowerShell cmdlet reference, see [Azure Automation State Configuration cmdlets](/powershell/module/az.automation)
334334
- For pricing information, see [Azure Automation State Configuration pricing](https://azure.microsoft.com/pricing/details/automation/)
335335
- To see an example of using Azure Automation State Configuration in a continuous deployment pipeline, see [Continuous Deployment Using Azure Automation State Configuration and Chocolatey](automation-dsc-cd-chocolatey.md)

0 commit comments

Comments
 (0)