Each time I Iaunch Powershell it automatically runs a cmdlet

Jay Thomas
Jay Thomas used Ask the Experts™
on
Each time I Iaunch Powershell it automatically runs a cmdlet. Where could this be coming from? Even if I reboot. Looks like something is set to auto run but not sure where it's coming from. Any ideas?. See pic
ee.GIF
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
"Batchelor", Developer and EE Topic Advisor
Top Expert 2015
Commented:
This are the scripts automatically executed if existing.
      All Users            $pshome\profile.ps1
      All Users, private      $pshome\Microsoft.PowerShell_profile.ps1
      Current User            $((Split-Path $profile –Parent) + "\profile.ps1")
      Current User, private      $profile
"private" means that only the directly started PowerShell console is running those, but not integrated ones (like in the ISE).
Most Valuable Expert 2018
Distinguished Expert 2018
Commented:
Try the locations described here:
Understanding the Six PowerShell Profiles
https://blogs.technet.microsoft.com/heyscriptingguy/2012/05/21/understanding-the-six-powershell-profiles/

Author

Commented:
Oh boy! That easy :)

Thank you chaps.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial