PowerShell Universal
DownloadsIssuesDiscordForums
v4
v4
  • About
  • What's New in v4?
  • Get Started
  • Additional Resources
  • Installation
    • Docker
    • Upgrading
    • Uninstall
  • Licensing
  • System Requirements
  • Supported Browsers
  • Cmdlet Help
  • API
    • About
    • Endpoints
    • Event Hubs
    • Security
    • Error Handling
    • Rate Limiting
  • Automation
    • About Automation
    • Scripts
      • Parameters
    • Jobs
    • Schedules
    • System Events
    • Terminals
    • Triggers
    • Queues
  • User Interfaces
    • About
    • Apps
    • Examples
    • Components
      • Pages
      • Dynamic Regions
      • Element
      • Error Boundary
      • HTML
      • Custom Components
        • Building Custom JavaScript Components
      • Data Display
        • Alert
        • Badge
        • Chip
        • Data Grid
        • Date and Time
        • Icon
        • List
        • Markdown
        • Table
        • Timeline
        • Tooltip
        • Tree View
        • Typography
      • Data Visualization
        • Charts
        • Image
        • Map
      • Feedback
        • Backdrop
        • Modal
        • Progress
        • Skeleton
      • Inputs
        • Autocomplete
        • Button
        • Checkbox
        • Code Editor
        • Date Picker
        • Editor
        • Floating Action Button
        • Form
        • Radio
        • Rating
        • Select
        • Slider
        • Switch
        • Textbox
        • Time Picker
        • Transfer List
        • Upload
      • Navigation
        • Drawer
        • Link
        • Menu
        • Stepper
        • Tabs
      • Layout
        • Grid Layout
        • Grid
        • Hidden
        • Stack
      • Utilities
        • Protect Section
        • Transitions
      • Surfaces
        • AppBar
        • Card
        • Paper
        • Expansion Panel
    • Custom Variable Scopes
    • Interaction
    • Role Based Access
    • Scheduled Endpoints
    • Sessions
    • Themes
      • Cascading Style Sheets
      • Styles
  • Desktop
    • About Desktop Mode
    • File Associations
    • Hotkeys
    • Pages
    • Protocol Handlers
  • Platform
    • Cache
    • Computers
    • Health Checks
    • Middleware
    • Modules
    • Monitoring
    • Notifications
    • Plugins
    • Published Folders
    • Templates
    • Translations
    • User Sessions
    • Variables
  • Configuration
    • About
    • API
    • Command Line Options
    • Environments
    • Feature Flags
    • Git
    • Hosting
      • Azure
      • High Availability
      • IIS
      • Reverse Proxy
    • Login Page
    • Management API
    • Persistence
    • App Settings
    • Security
      • Access Controls
      • App Tokens
      • Client Certificate
      • OpenID Connect
      • PowerShell Protect
      • SAML2
      • WS-Federation
    • Repository
    • Running as a Service Account
    • Best Practices
  • Development
    • Debugging Scripts
    • Editor
    • Hangfire
    • Logging
    • Profiling
    • Visual Studio Code Extension
  • Samples
    • APIs
      • Custom Status Codes
    • Apps
      • Active Directory Tree View
      • Export-CSV Download
      • Dynamic Select Dropdown
      • Textbox Length Validation
      • Tree View Font Size
      • SQL Data Grid
  • Changelogs
    • Changelog
    • Extension Changelog
Powered by GitBook

PowerShell Universal

  • Downloads
  • Pricing
  • Gallery

Community

  • Issues
  • Forums
  • Discord

Support

  • Portal
  • Knowledgebase

Copyright 2025 Ironman Software

On this page
  • Application Insights
  • Configuring Application Insights
  • Viewing Monitoring Data
  • Performance Counters
  • Installation
  • Processes
  • User Sessions

Was this helpful?

Edit on GitHub
Export as PDF
  1. Platform

Monitoring

Monitoring PowerShell Universal with Application Insights and Performance Counters

PreviousModulesNextNotifications

Last updated 1 year ago

Was this helpful?

PowerShell Universal automatically integrates with Microsoft Application Insights to provide monitoring and alerting for your system. It also provides performance counters for various features in the environment.

Application Insights

Configuring Application Insights

Within the Azure Portal, you will need to create a new Application Insights resource. Once it's been created, you will need to copy the instrumentation key.

  "ApplicationInsights": {
    "InstrumentationKey": "73b84b67-6fc9-4c37-9f54-000000000000"
  },

If you are running PowerShell Universal in Azure, you can also create a new Application Setting. Within your web app, click Configuration and the n Click New application setting.

The name should be:

APPLICATIONINSIGHTS__INSTRUMENTATIONKEY

The value should be the instrumentation key. Restart your web app to start collecting metrics.

Viewing Monitoring Data

Within the Azure Portal, you can view the Application Insights resource to view information about your PowerShell Universal server. This will include data such as failed responses, server response time, server requests and availability. You'll also be able to setup alerts to monitor for particular conditions of the PowerShell Universal server.

Performance Counters

Performance counters are only supported on Windows.

Performance counters are installed when running the MSI installer. Once this occurs, performance data will automatically be generated by the following counters.

  • PowerShell Universal \ Active API Endpoints \ _Total

  • PowerShell Universal \ Active API Endpoints \ Endpoint

  • PowerShell Universal \ API Endpoint Calls per Second \ _Total

  • PowerShell Universal \ API Endpoint Calls per Second \ Endpoint

  • PowerShell Universal \ API Execution Time \ _Total

  • PowerShell Universal \ API Execution Time \ Endpoint

  • PowerShell Universal \ Active Dashboard Connections \ _Total

  • PowerShell Universal \ Active Dashboard Connections \ Dashboard

Installation

By default, the MSI will install the performance counters. If you are running PowerShell Universal outside of the MSI, you will need to install them yourself. You can do so with the following script. You will need to run it from an elevated prompt.

$categoryName = "PowerShell Universal"
$categoryType = [System.Diagnostics.PerformanceCounterCategoryType]::MultiInstance
$categoryExists = [System.Diagnostics.PerformanceCounterCategory]::Exists($categoryName)

If (-Not $categoryExists)
{
$objCCDC = New-Object System.Diagnostics.CounterCreationDataCollection
$objCCD1 = New-Object System.Diagnostics.CounterCreationData
$objCCD1.CounterName = "Active Endpoints"
$objCCD1.CounterType = "NumberOfItems32"
$objCCD1.CounterHelp = "Active number of executing endpoints."
$objCCDC.Add($objCCD1) | Out-Null

$objCCD1 = New-Object System.Diagnostics.CounterCreationData
$objCCD1.CounterName = "Execution Time"
$objCCD1.CounterType = "averageTimer32"
$objCCD1.CounterHelp = "Average execution time."
$objCCDC.Add($objCCD1) | Out-Null

$objCCD1 = New-Object System.Diagnostics.CounterCreationData
$objCCD1.CounterName = "Execution Time Base"
$objCCD1.CounterType = "averageBase"
$objCCD1.CounterHelp = "Average execution time base."
$objCCDC.Add($objCCD1) | Out-Null

$objCCD1 = New-Object System.Diagnostics.CounterCreationData
$objCCD1.CounterName = "Calls per second"
$objCCD1.CounterType = "rateOfCountsPerSecond64"
$objCCD1.CounterHelp = "Number of executions per second."
$objCCDC.Add($objCCD1) | Out-Null

$objCCD1 = New-Object System.Diagnostics.CounterCreationData
$objCCD1.CounterName = "Active Connections"
$objCCD1.CounterType = "numberOfItems64"
$objCCD1.CounterHelp = "Number of active connections to dashboards"
$objCCDC.Add($objCCD1) | Out-Null

[System.Diagnostics.PerformanceCounterCategory]::Create($categoryName, $categoryHelp, $categoryType, $objCCDC)|Out-Null
}

Processes

Processes started directly from PowerShell Universal will be displayed in the processes page. You can access this page by click Home and then the Processes card.

Information includes the process ID, purpose, file name, and memory usage. You can also view the state of runspaces within the process.

Note that processes started by your scripts will not be listed here.

User Sessions

You can view user sessions for dashboards and the admin console by click the User Sessions card on the Home page. Session information includes the connection time, source, user name, user agent string and remote IP Address.

Next, paste your instrumentation key into the for PowerShell Universal. Finally, restart the PowerShell Universal server. Application monitoring will now be enabled.

Settings file
Application Insights Information