October 5th, 2012

PowerTip: Enter a PowerShell Nested Prompt Directly

Doctor Scripto
Scripter

Summary: Learn how to directly enter a Windows PowerShell nested prompt.

 Hey, Scripting Guy! Question How can you directly enter a nested prompt without going through a cmdlet and using Suspend?

Hey, Scripting Guy! Answer Use the EnterNestedPrompt method from the $host object:

PS C:\> $host.EnterNestedPrompt()

PS C:\>> exit

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.