The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Creating Runspaces


A runspace is the operating environment for the commands that are invoked by a host application. This environment includes the commands and data that are currently present, and any language restrictions that currently apply.

Host applications can use the default runspace that is provided by Windows PowerShell, which includes all available core commands, or create a custom runspace that includes only a subset of the available commands. To create a customized runspace, you create an InitialSessionState object and assign it to your runspace.

The following topics contain explanations and code examples of common runspace tasks.

  1. Creating an InitialSessionState

  2. Creating a constrained runspace

  3. Creating multiple runspaces