Microsoft.PowerShell.Host module: setup and commands
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
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
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