Test-AppInsightsAgentStatus
0.2.0
(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
(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.
Installation Options
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
- Test-AppInsightsAgentStatus.nuspec
- Test-AppInsightsAgentStatus.ps1
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 0.2.0 (current version) | 4 | 3/20/2026 |