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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -