July 9th, 2015

PowerTip: Determine Name of PowerShell Host

Doctor Scripto
Scripter

Summary: Learn how to determine the name of the Windows PowerShell host.

Hey, Scripting Guy! Question How can I find the name of the Windows PowerShell host (such as the Windows PowerShell console or
           the Windows PowerShell ISE)?

Hey, Scripting Guy! Answer Use the Get-Host cmdlet and select the Name property:

(get-host).name

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.