Skip to content

pwsh

pwsh documentation

Pwsh

Pwsh(name: str, *base: str, in_process: bool = False, path: str = '', entry: str = '', single_dash: bool = False, version_argv: tuple[str, ...] = ('--version',), policy: dict[str, Any] | None = None)

Bases: Tool[_R]

Methods:

Name Description
__call__

Run a command string in PowerShell: pwsh -c "<command>". A real shell:

Attributes:

Name Type Description
argv Pwsh[Argv]

argv property

argv: Pwsh[Argv]

__call__

__call__(command: str | PathLike[str], /, *args: str | PathLike[str], **flags: Any) -> _R

Run a command string in PowerShell: pwsh -c "<command>". A real shell: pipes, redirects, globbing and variables all work. run(...) stays shell-free.