diff --git a/src/internal/functions/Write-AzOpsMessage.ps1 b/src/internal/functions/Write-AzOpsMessage.ps1 index ccc15abc..b3165fe8 100644 --- a/src/internal/functions/Write-AzOpsMessage.ps1 +++ b/src/internal/functions/Write-AzOpsMessage.ps1 @@ -114,7 +114,7 @@ Data = $Data } Write-PSFMessage @params - if ($env:APPLICATIONINSIGHTS_CONNECTION_STRING -ne '' -and $ApplicationInsights -eq $true) { + if ($env:APPLICATIONINSIGHTS_CONNECTIONSTRING -ne '' -and $ApplicationInsights -eq $true) { # Initiate export of log to ApplicationInsights try { # Gather log generated by Write-PSFMessage with retry/backoff logic