PowerShell Universal
DownloadsIssuesDiscordForums
v1
v1
  • About
  • Get Started
    • Additional Resources
    • Installation
      • Docker
      • Upgrading
    • Licensing
    • System Requirements
    • Supported Browsers
    • Visual Studio Code Extension
  • Cmdlet Help
  • Examples
    • Active Directory
    • Hyper-V
    • Image Processing
    • Monitoring
    • PowerShell Protect
    • Slack
    • SQL
  • API
    • About
    • Development
    • Endpoints
    • Security
    • Error Handling
    • Rate Limiting
  • Automation
    • About
    • Development
    • Scripts
      • Parameters
    • Jobs
    • Schedules
    • Triggers
    • Variables
  • Dashboard
    • About
    • Development
    • Dashboards
      • Migrating From Universal Dashboard 2.9
      • Building Dashboards
      • Custom Variable Scopes
    • Frameworks
    • Components
      • Pages
      • Dynamic Regions
      • Element
      • Error Boundary
      • HTML
      • Building Custom Components
      • Data Display
        • Alert
        • Chip
        • Date and Time
        • Icon
        • List
        • Table
        • Tree View
        • Typography
      • Data Visualization
        • Charts
        • Map
      • Feedback
        • Backdrop
        • Modal
        • Progress
        • Skeleton
      • Inputs
        • Autocomplete
        • Button
        • Checkbox
        • Code Editor
        • Date Picker
        • Floating Action Button
        • Form
        • Radio
        • Select
        • Slider
        • Switch
        • Textbox
        • Time Picker
        • Upload
      • Navigation
        • Drawer
        • Stepper
        • Tabs
      • Layout
        • Grid Layout
        • Grid
        • Hidden
      • Utilities
        • Transitions
      • Surfaces
        • AppBar
        • Card
        • Paper
        • Expansion Panel
    • Interaction
    • Published Folders
    • Themes
      • Cascading Style Sheets
      • Styles
    • Scheduled Endpoints
    • Role Based Access
    • Marketplace
  • Platform
    • Cache
    • Monitoring
  • Configuration
    • About
    • API
    • Environments
    • Hosting
      • IIS
      • Single-File
    • Login Page
    • Management API
    • Settings
    • Security
      • App Tokens
      • OpenID Connect
      • WS-Federation
    • Running as a Service Account
    • Git
  • Debugging
    • Logging
    • Debugging Scripts
  • Changelog
  • Extension Changelog
  • Legacy Universal Dashboard Docs
Powered by GitBook

PowerShell Universal

  • Downloads
  • Pricing
  • Gallery

Community

  • Issues
  • Forums
  • Discord

Support

  • Portal
  • Knowledgebase

Copyright 2025 Ironman Software

On this page
  • Configuring Environments
  • Name
  • Path and Arguments
  • Modules
  • Variables
  • Using Environments
  • APIs
  • Automation
  • Dashboards
  • Security
  • Integrated Environment
  • Configuring
  • APIs
  • Automation
  • Dashboards

Was this helpful?

Edit on Git
Export as PDF
  1. Configuration

Environments

Information about execution environments.

PreviousAPINextHosting

Last updated 3 years ago

Was this helpful?

Environments allow you to define an executable, arguments, modules and variables to use when running scripts, hosting APIs and dashboards.

Environments are stored within the environments.ps1 file.

Configuring Environments

To configure environments, you can use the Settings \ Environments page.

Environments support setting the name, path, arguments, modules and variables.

Name

The name of the environment. This name will be shown through out the rest of the platform when running scripts, configuring the API host environment and hosting dashboards.

Path and Arguments

Environments support defining a path to an executable and arguments for that executable. These should be either PowerShell.exe or Pwsh.exe.

You can also define modules and variables.

Modules

The modules list allows you to define zero or more modules to load in the PowerShell runspaces for the environment. These modules will be part of the initial session state so they will not need to be loaded manually. Items added to this list can either be module names or full paths to module files.

Variables

You can also use wild cards (*) to bring in multiple variables that match a pattern.

Using Environments

Environments can be used across the platform.

APIs

To select the environment to use, modify the settings.ps1 file and include the -ApiEnvironment parameter of Set-PSUSetting. It needs to be the name of the environment.

Automation

Each script, job and schedule can use an environment. You can define environments for scripts by modifying the scripts.ps1 and setting the -Environment parameter of New-PSUScript. To set the environment of a schedule, set the -Environment parameter of New-PSUSchedule in schedules.ps1. When invoking a script, you can also choose an environment to use.

Dashboards

To use a particular environment for a dashboard, set the -Environment parameter of New-PSUDashboard in dashboards.ps1.

Security

By default, authentication and authorization happen within the Universal.Server.exe process. To run these out of process, you can select an environment by setting the -SecurityEnvironment parameter of Set-PSUSetting in settings.ps1.

Integrated Environment

This documentation is for a feature in an upcoming version of PowerShell Universal.

The integrated environment uses the PowerShell Universal server process directly rather than starting external PowerShell processes to service requests.

The integrated environment is easier to configure and use than having multiple disparate environments. You will also see a performance improvement because there is no need to serialize and communicate via interprocess communication.

The downside is that you cannot elevate to alternate credentials or use alternate PowerShell versions. You will be using the current version of the PowerShell Universal server's PowerShell SDK.

Configuring

The integrated environment is always available and you do not need to configured it directly. If you do want to import modules or set up persistent runspaces, you can set settings for the integrated environment in environments.ps1.

New-PSUEnvironment -Name 'Integrated' -Path 'none' -Modules @('ActiveDirectory')

APIs

To set the integrated environment, you can use the Set-PSUSetting in settings.ps1.

Set-PSUSetting -ApiEnvironment 'Integrated'

Automation

Automation does not support the integrated environment.

Dashboards

Dashboards do not support the integrated environment.

The variables list allows you to define zero or more variables to load in the PowerShell runspaces for the environment. This list can consist of variable names from the .

variable configuration