Differences Between Running a Script In ISE versus Powershell.exe

This topic contains 3 replies, has 3 voices, and was last updated by Profile photo of Paul LeDuc Paul LeDuc 4 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #38468
    Profile photo of Paul LeDuc
    Paul LeDuc

    I know that this is probably a really basic question but I am new to Powershell and am learning by the hour. I would like to know the differences between running a script in the ISE versus Powershell.exe? I have a module and script that I have created in the ISE and tested it there. It works as expected. However, as soon as I ran it using powershell.exe , the script ran differently. The only thing I can think is the running environment differs between the tools? Can someone point me in the direction of documentation that may clarify this?

    Thank you,

    Profile photo of Chris Bakker
    Chris Bakker

    Ise is loading a few extra modules, but normaly it should do the same thing,
    If you post the script and specify what is different we can have a look.

    Profile photo of Michael Maher
    Michael Maher

    Hi Paul,

    Have you done any profile customization?

    The ISE and the PowerShell console have separate profile scripts.

    If you type in $profile it will show you the relevant paths and you can open the file to check it out


    Profile photo of Paul LeDuc
    Paul LeDuc

    Thank you for the assistance. I figured out the issue was with the code that I was using to find the script directory.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.