Skip to content

Commit 945f9fd

Browse files
authored
Merge pull request MicrosoftDocs#32188 from timothytavarez/patch-1
Correct parameter name. Update cmdlets to Az.
2 parents 851e5ad + e9ae123 commit 945f9fd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

articles/automation/automation-dsc-diagnostics.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,27 @@ To begin importing data from Azure Automation DSC into Azure Monitor logs, compl
4545

4646
```powershell
4747
# Find the ResourceId for the Automation Account
48-
Get-AzureRmResource -ResourceType 'Microsoft.Automation/automationAccounts'
48+
Get-AzResource -ResourceType 'Microsoft.Automation/automationAccounts'
4949
```
5050

5151
1. Get the _ResourceId_ of your Log Analytics workspace by running the following PowerShell command:
5252
(if you have more than one workspace, choose the _ResourceID_ for the workspace you want to configure).
5353

5454
```powershell
5555
# Find the ResourceId for the Log Analytics workspace
56-
Get-AzureRmResource -ResourceType 'Microsoft.OperationalInsights/workspaces'
56+
Get-AzResource -ResourceType 'Microsoft.OperationalInsights/workspaces'
5757
```
5858

5959
1. Run the following PowerShell command, replacing `<AutomationResourceId>` and `<WorkspaceResourceId>` with the _ResourceId_ values from each of the previous steps:
6060

6161
```powershell
62-
Set-AzureRmDiagnosticSetting -ResourceId <AutomationResourceId> -WorkspaceId <WorkspaceResourceId> -Enabled $true -Categories 'DscNodeStatus'
62+
Set-AzDiagnosticSetting -ResourceId <AutomationResourceId> -WorkspaceId <WorkspaceResourceId> -Enabled $true -Category 'DscNodeStatus'
6363
```
6464

6565
If you want to stop importing data from Azure Automation State Configuration into Azure Monitor logs, run the following PowerShell command:
6666

6767
```powershell
68-
Set-AzureRmDiagnosticSetting -ResourceId <AutomationResourceId> -WorkspaceId <WorkspaceResourceId> -Enabled $false -Categories 'DscNodeStatus'
68+
Set-AzDiagnosticSetting -ResourceId <AutomationResourceId> -WorkspaceId <WorkspaceResourceId> -Enabled $false -Category 'DscNodeStatus'
6969
```
7070

7171
## View the State Configuration logs

0 commit comments

Comments
 (0)