Differences in Powershell environments -
is there difference between running powershell script:
- from command line
powershell.exe -file my_scipt.ps1
- from powershell ise (open script in editor , press green play button run)
- from windows powershell host application?
and if there difference, there way in powershell check it?
the reason asking seeing 1 script have different behaviour in these 3 environments, though had expected see same outcome. behaviour (3rd party non-public) .net library using crashes in second 2 environments, works fine in first one.
we have checked obvious things, such as:
- directory of powershell process set same (which set via
[system.io.directory]::setcurrentdirectory($my_path)
in script) - powershell , .net version (confirmed via identical
$psversiontable
) - system path
my hope in asking question there difference unaware of, , identifying can resolve crash seeing. i'd interested hear of similar experiences here.
Comments
Post a Comment