PowerShell Genie

Microsoft.PowerShell.Host module: setup and commands

Module 2 min read Windows PowerShell 5.1 and PowerShell 7

Documentation: Microsoft Learn

Record console sessions with transcripts and interact with the host using Read-Host, Start-Transcript, and Stop-Transcript.

Getting it

Ships with PowerShell everywhere and loads automatically at startup. No installation needed.

Examples

1PS> Start-Transcript -Path C:\Logs\change-20261016.txt
1PS> Stop-Transcript
1PS> $server = Read-Host -Prompt 'Enter server name'

What it is for

Use it to capture everything typed and displayed in a console session, and to prompt for input during interactive scripts. Transcripts are the simplest audit trail for ad-hoc admin work.

Typical tasks

  • Start and stop a transcript of the console session
  • Prompt for input with Read-Host
  • Review what was typed and displayed during a change window
  • Save session evidence for incident records

Check the installed version

1PS> Get-Module -ListAvailable Microsoft.PowerShell.Host | Select-Object Name, Version, Path
2PS> Get-Command -Module Microsoft.PowerShell.Host

Compare the module path and version with the session used by your scheduled task or automation account. Use it to capture everything typed and displayed in a console session, and to prompt for input during interactive scripts. Transcripts are the simplest audit trail for ad-hoc admin work.

Primary documentation

Start-Transcript reference · Stop-Transcript reference · Read-Host reference

Continue
Genie guideMicrosoft.PowerShell.Host module: setup and commands

Record console sessions with transcripts and interact with the host using Read-Host, Start-Transcript, and Stop-Transcript.