Resetting the session in PowerShell Resetting the session in PowerShell windows windows

Resetting the session in PowerShell


You can just dotsource your profile.

. $Profile

If your profile handles errors when things like drives, or vars even exists, everything is ok.


You can try and dot-source your profile instead though some things may not work (like trying to redefine constants, etc).

A blog post to restart the shell:

http://scriptolog.blogspot.com/2006/12/restart-your-engins-powershell-way_28.html