Skip to content

Instantly share code, notes, and snippets.

@JamesDLD
Last active June 3, 2020 14:46
Show Gist options
  • Save JamesDLD/f49284ed94b5485a953be6d52de5af44 to your computer and use it in GitHub Desktop.
Save JamesDLD/f49284ed94b5485a953be6d52de5af44 to your computer and use it in GitHub Desktop.
Demonstrate how to send the diagnostic settings of a Windows Virtual Desktop workspace to a Log Analytics workspace.
New-AzPolicyDefinition -Name 'Windows Virtual Desktop Workspace Diagnostic Settings' `
-DisplayName 'Deploy Diagnostic Settings for Windows Virtual Desktop Workspace to Log Analytics workspace' `
-Policy "https://raw.githubusercontent.com/JamesDLD/AzureRm-Template/master/Create-WvdDiagnosticsPolicy/workspaces.json" `
-Parameter "https://raw.githubusercontent.com/JamesDLD/AzureRm-Template/master/Create-WvdDiagnosticsPolicy/parameters.json" `
-Metadata '{"category":"Log Monitor"}' `
-Mode Indexed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment