PSApplicationInsights / PSApplicationInsights

Application Insights for PowerShell scripts and Modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build status

PSApplicationInsights

Application Insights for PowerShell scripts and Modules

Compatibility

Only tested on PowerShell 5

Usage Samples

The following sample scripts are available to get you started:

Basic Use

Basic Use

Live Metrics

Exceptions

Demonstration of the Exception Logging capabilities of Application Insights

LogExceptions

Performance Counters

Start collection perfromance counters and send them to App Insights

Performance Counters

Advanced Tracing

Sample of helper functions and extended tracing

Advanced Tracing

Development

  • install psake (Build Automation Tool)

Install-Module -Name psake

  • install pester (PS Unit Test Tool)

Install-Module -Name Pester -Force -SkipPublisherCheck

Install-Module -Name CredentialManager

Unit Testing

As seen above, Unit Tests are executed using Pester. You also need Fiddler installed on your system, this can be done using chocolatey: choco install fiddler

A fiddler script is added automatically. A backup of your current script is created, as it gets overwritten from \Fiddler2\Scripts The script adds a new Fiddler QuickExec command "dumpjson" to be able to retrieve the captured data in JSON format for PowerShell consumption.

About

Application Insights for PowerShell scripts and Modules

License:MIT License


Languages

Language:PowerShell 83.0%Language:JavaScript 15.4%Language:Batchfile 1.6%