Add Application Insights to PowerShell to get both simple and advanced tracing to gain insight to how your scripts are actually working, including errors and functional usage

Minimum PowerShell version


Installation Options

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

Install-Module -Name PSAppInsights

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

Install-PSResource -Name PSAppInsights

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


Jos Verlinde [MSFT]


(c) 2016-2017 Jos Verlinde. All rights reserved.

Package Details



Tracing ApplicationInsights Monitoring DevOps


New-AIClient Push-AIClient Stop-AIClient Send-AIEvent Send-AITrace Send-AIMetric Send-AIException Send-AIDependency New-Stopwatch Start-AIPerformanceCollector Stop-AIPerformanceCollector Start-AILiveMetrics Stop-AILiveMetrics getCallerVersion ConvertTo-Hashtable Get-StringHash getCallerInfo


This module has no dependencies.

Release Notes

v0.9.6   Detect version of ps1 scripts running in Azure Automation
v0.9.4   Improved errorhandling and reporting during client initialisation            
V0.9.2.3 Silently fail if client has not been initialised, to allow adding  SEND-AI* statements withouth the need to remove them to avoid dependencies
V0.9.2   Improve Stacklogging, Send-AIException,
v0.9.1   Add -Stackwalk to allow Wrapping of a Log function and still allow correct reporting of the calling function -StackWalk 1
V0.9.0.2 Add -Developer Mode and -Sending interval to control how quick to send the information to AI
V0.9     Upgrade to ApplicationInSights 2.3.0, fix dependency load on Windows 10
V0.8.1   Code cleanup and cosmetics
V0.8.1   Default operation is name of calling Powershell script
V0.8     Integrate multiple different Features.
V0.7.4   Upgrade to ApplicationInSights 2.2.0
V0.7.3   Add support to report Powershell call stack
V0.7.2   Add Convertto-hashtable
V0.7     Add Collection of Performance Counters, Update to PSGallery
V0.6.2   Add caller's script or module version information to start-AISession
V0.6.1   Automatically add caller information on new Session (Script,  Line Number )
V0.6.0.2 Resolve naming collision for get-hash
V0.5     initial publication


Version History

Version Downloads Last updated
0.9.6 (current version) 50,821 5/27/2017
0.9.5 175 5/27/2017
0.9.4 77 5/6/2017
0.9.3 79 5/5/2017 68 4/29/2017 64 4/28/2017
0.9.1 64 4/25/2017 67 4/19/2017 70 4/12/2017
0.8 93 2/9/2017
0.7.2 117 11/1/2016
0.7.1 65 10/31/2016
0.7 67 10/30/2016 73 10/24/2016
0.5 70 10/23/2016
Show more