🥳
PowerShell Universal
Ironman SoftwareForums
v3
v3
  • About
  • What's New in v3?
  • Get Started
  • Additional Resources
  • Installation
    • Docker
    • Upgrading
    • Uninstall
  • Licensing
  • System Requirements
  • Supported Browsers
  • Cmdlet Help
  • Modules
  • API
    • About
    • Endpoints
    • Security
    • Error Handling
    • Rate Limiting
  • Automation
    • About Automation
    • Scripts
      • Parameters
    • Jobs
    • Schedules
    • System Events
    • Terminals
    • Triggers
    • Queues
  • User Interfaces
    • About
    • Dashboards
      • Dashboards
      • 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
      • Interaction
      • Marketplace
      • Role Based Access
      • Scheduled Endpoints
      • Sessions
      • Themes
        • Cascading Style Sheets
        • Styles
      • Custom Variable Scopes
      • Migrating From Universal Dashboard 2.9
    • Pages
      • Alerts
      • Bar Chart
      • Button
      • Card
      • Form
      • iFrame
      • Image
      • Line Chart
      • Liquid Chart
      • Paragraph
      • Statistic
      • Table
      • Variables
  • Desktop
    • About Desktop Mode
    • File Associations
    • Hotkeys
    • Pages
    • Protocol Handlers
  • Platform
    • Cache
    • Modules
    • Monitoring
    • Notifications
    • Published Folders
    • Templates
    • Translations
    • User Sessions
    • Variables
  • Configuration
    • About
    • API
    • Command Line Options
    • Environments
    • Feature Flags
    • Git
    • Hosting
      • Azure
      • High Availability
      • IIS
    • Login Page
    • Management API
    • Persistence
    • App Settings
    • Security
      • Best Practices
      • 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
  • Changelog
  • Extension Changelog
  • Legacy Universal Dashboard Docs
Powered by GitBook

Copyright 2025 Ironman Software

On this page
  • Admin Console
  • appsettings.json
  • Changing the Logging Level
  • Changing the Logging Path
  • Logging in IIS
  • Event Logs
  • Common Logging Scenarios
  • Out of Process Startup Failure in IIS
  • Did not receive port from client process
Edit on GitHub
Export as PDF
  1. Development

Logging

Information about logging in PowerShell Universal.

PreviousHangfireNextProfiling

Last updated 3 years ago

Admin Console

Logging levels can be changed within the Settings \ General \ Diagnostics page.

The Log Level setting configures PowerShell Universal logging settings. The Microsoft Log Level setting controls more low-level components within the web server. This is useful for debugging issues with authentication or authorization.

Clicking Download Logs will provide a zip archive of all the log files in the log directory on the server.

appsettings.json

Changing the Logging Level

To adjust the logging level, change the values in the appsettings.json file in the Logging LogLevel section.

For example, to enable debug logging, set all the levels to debug.

"Logging": {
    "Path":"%HOME%/.PowerShellUniversal/log.txt",
    "LogLevel": {
    "Default": "Debug",
    "Microsoft": "Debug",
    "Microsoft.Hosting.Lifetime": "Debug"
    }
  },

This setting can also be set using environment variables. These values need to be set before starting the Universal server.

$Env:Logging__LogLevel__Default = "Debug"

Changing the Logging Path

To adjust the logging path, change the values in the appsettings.json file in the Logging Path section.

  "Logging": {
      "Path":"C:\log.txt",
      "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
      }
    },

This setting can also be set using environment variables. These values need to be set before starting the Universal server.

$Env:Logging__Path = "C:\log.txt"

Logging in IIS

In addition to the logs produced by the Universal server, you can also retrieve log files produced by IIS. Log files for IIS are configured in the web.config file that is provided by Universal. By default, these logs are in the base website directory's log folder.

You can disable these logs by setting stdoutLogEnabled to false.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath=".\Universal.Server" arguments="" forwardWindowsAuthToken="false" stdoutLogEnabled="true" stdoutLogFile=".\logs\log" hostingModel="OutOfProcess" />
  </system.webServer>
</configuration>
<!--ProjectGuid: 588ACF2E-9AE5-4DF1-BC42-BCE16A4C4EDE-->

Event Logs

Universal will create event log entries for Warning and Error logs. These logs are typically produced by unhandled exceptions that crash the process or by errors thrown by the Universal web host.

These logs can be found by looking for Warning and Error level messages produced by the .NET Runtime source.

Common Logging Scenarios

Out of Process Startup Failure in IIS

It may also be helpful to run the Universal server outside of IIS to validate that the server can properly run Universal.

Did not receive port from client process

Universal uses gRPC to communicate with external PowerShell processes that are started by the system. These processes run jobs, dashboards and the API server. This error indicates that the PowerShell process did not start correctly.

Logging is controlled back the . By default, logging is enabled for the Information level and above. Also by default, logs are written to the %ProgramData%\PowerShellUniversal folder.

This error is produced when the IIS server fails to start Universal. The problem can be diagnosed by looking in the and the .

To diagnosis this issue, for the Universal server. Debug logging will record the stdout from the PowerShell process to capture any startup errors that may be occurring in the process.

application settings
logs produced by Universal
stdout logs produced by IIS
enable Debug logging