Page 1 of 1

What is the Script Engine name when debugging

Posted: Tue Apr 23, 2019 1:19 am
by FrankAndrew
Product, version and build: PowerShell Studio 2019 5.6.160
32 or 64 bit version of product: 64 bit
Operating system: Windows 7 Enterprise & Windows 10 (1709)
32 or 64 bit OS: 64 bit

With PrimalScript runtime Debugging I can get the ScriptEngine Name by calling:

Code: Select all

Set FSO          = WScript.CreateObject( "Scripting.FileSystemObject" )
ScriptEngineName = FSO.GetBaseName( WScript.FullName )
Is there an equivalent call when in the SAPIEN PowerShell Studio Debugger?
If yes what is the REAL PowerShell Scripting Engine Name?

I Need this functionality do to the fact that some calls in PowerShell either don't work when running in your Debugger or they work differently.

Re: What is the Script Engine name when debugging

Posted: Tue Apr 23, 2019 7:21 am
by davidc
PowerShell has a built-in host variable that lets you access the host's name:

Code: Select all

$Host.Name

Re: What is the Script Engine name when debugging

Posted: Tue Apr 23, 2019 12:56 pm
by FrankAndrew
Thanks David that is EXACTLY what I was looking for! :D