Differences Between Running a Script In ISE versus Powershell.exe

Hi,
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,

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.

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

Michael

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