September 21st, 2015

PowerTip: Use PowerShell to Determine Host

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to find your PowerShell host.

Hey, Scripting Guy! Question How can I use Windows PowerShell to determine what PowerShell host is being used?

Hey, Scripting Guy! Answer Use the Get-Host cmdlet. To get only the name of the host, use the following syntax:

(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.

Feedback