Test-AppInsightsAgentStatus

0.2.0

Comprehensive diagnostic tool for the Azure Application Insights on-premises agent
(also known as Status Monitor V2 or Redfield Agent). Validates all installation
artifacts created during the Enable-ApplicationInsightsMonitoring workflow and
inspects running processes to determine agent attachment status.

Currently supports Status Monitor V2 (Redfield) on IIS. Future
Comprehensive diagnostic tool for the Azure Application Insights on-premises agent
(also known as Status Monitor V2 or Redfield Agent). Validates all installation
artifacts created during the Enable-ApplicationInsightsMonitoring workflow and
inspects running processes to determine agent attachment status.

Currently supports Status Monitor V2 (Redfield) on IIS. Future versions will
support VM Extensions, App Service, and Functions auto-instrumentation.

QUICK START:
 .\Test-AppInsightsAgentStatus.ps1
 .\Test-AppInsightsAgentStatus.ps1 -IncludeInstrumentationEngine

WHAT IT CHECKS:
 - IIS service health (W3SVC and WAS)
 - applicationHost.config module registration (ManagedHttpModuleHelper)
 - GAC assembly registration
 - Registry environment variables (Classic AI and OpenTelemetry modes)
 - IIS application pool pipeline mode (Integrated vs Classic)
 - Application pool identity performance counter permissions
 - Redfield configuration files (ikey.config)
 - PowerShell module installation (Az.ApplicationMonitor)
 - ASP.NET Core startup hook and hosting startup files
 - Instrumentation Engine CLR profiler configuration (auto-detected or -IncludeInstrumentationEngine)

All checks are READ-ONLY. The script never modifies any configuration.

OUTPUT MODES:
- Default:  Full verbose output with educational explanations
- Compact:  Progress lines only with focused diagnosis at the end

WHAT TO EXPECT:
The script runs non-interactively in ~5-15 seconds. Results display as they
complete. Must be run as Administrator for full accuracy.

COMPANION TOOL:
If the agent status looks healthy but telemetry is still missing, run
Test-AppInsightsTelemetryFlow.ps1 to diagnose network path and backend issues.

Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Test-AppInsightsAgentStatus

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) Microsoft Corporation. All rights reserved.

Package Details

Author(s)

  • Todd Foust (Microsoft)

Tags

ApplicationInsights AzureMonitor Diagnostics Troubleshooting Agent StatusMonitor Redfield IIS

Functions

Get-Timestamp Write-Header Write-StepHeader Write-Result Write-DetailHost Write-ProgressStart Write-ProgressLine Add-Diagnosis Get-RegistryEnvironmentValue Add-CheckResult Protect-IKey Protect-ConnectionString

Dependencies

This script has no dependencies.

Release Notes

v0.2.0 - Preview release. Checks IIS services, applicationHost.config module
registration, GAC assembly, registry environment variables (Classic AI and
OpenTelemetry modes), app pool pipeline mode, performance counter permissions,
Redfield configuration files, PowerShell module, ASP.NET Core startup hooks,
and optional Instrumentation Engine (CLR profiler) configuration. Structured
diagnosis with prioritized remediation steps and docs links.

FileList

Version History

Version Downloads Last updated
0.2.0 (current version) 4 3/20/2026