Skip to content

Commit

Permalink
Merge pull request #173 from srozemuller/171-update-avddiagnostics-mi…
Browse files Browse the repository at this point in the history
…ss-avd-workspace-parameter

Corrected the parameter name in example
  • Loading branch information
srozemuller authored Feb 6, 2024
2 parents 405819a + 426021d commit c0dfe1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Az.Avd/Public/Update-AvdDiagnostics.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Update-AvdDiagnostics {
.PARAMETER LAWorkspace
Enter the name of the Log Analytics Workspace
.EXAMPLE
Update-AvdDiagnostics -HostPoolName avd-hostpool-001 -ResourceGroupName rg-avd-001 -AvdWorkspace avd-workpace-001 -DiagnosticsName
Update-AvdDiagnostics -HostPoolName avd-hostpool-001 -ResourceGroupName rg-avd-001 -LaWorkspace avd-workpace-001 -DiagnosticsName
#>
[CmdletBinding(DefaultParameterSetName = 'Category')]
param (
Expand Down Expand Up @@ -42,7 +42,7 @@ function Update-AvdDiagnostics {
[parameter(Mandatory, ParameterSetName = 'Category')]
[ValidateSet("Checkpoint", "Error", "Management", "Connection", "HostRegistration","AgentHealthStatus","NetworkData","SessionHostManagement","ConnectionGraphicsData")]
[array]$Categories

)
Begin {
AuthenticationCheck
Expand All @@ -57,7 +57,7 @@ function Update-AvdDiagnostics {
switch ($PsCmdlet.ParameterSetName) {
LAWS {
Write-Verbose "LAWS"
try {
try {
$url = "{0}/subscriptions/{1}/resourceGroups/{2}/providers/Microsoft.OperationalInsights/workspaces/{3}?api-version=2020-08-01" -f $global:AzureApiUrl, $global:subscriptionId, $LaResourceGroupName, $LAWorkspace
$loganalyticsParameters = @{
URI = $url
Expand Down Expand Up @@ -94,7 +94,7 @@ function Update-AvdDiagnostics {
workspaceId = $Laws.id
logs = @($CategoryBody)
}
}
}
$parameters = @{
uri = "{0}/{1}/providers/microsoft.insights/diagnosticSettings/{2}?api-version=2021-05-01-preview" -f $global:AzureApiUrl, $hostpool.Id, $diagnosticsName
Method = "PUT"
Expand Down

0 comments on commit c0dfe1b

Please sign in to comment.