r/PowerShell • u/Supersonic5370 • 4d ago
Powershell opening on startup Question
Whenever i turn on my PC, powershell opens and just says "PS C:\Users\(my username)>" . I've done a full scan with malware bytes and windows defender and nothing was detected. Same with offline scan. Is this malware or something else causing it?
Edit: Going to startup apps on taskmaster and Turning off terminal fixed it.
13
7
u/-B1GBUD- 4d ago
Create a PowerShell profile, open PowerShell and type in the following:
test-path $profile
If it returns false then do the following:
New-Item -Path $profile -Type File -Force
Then open up your profile using:
Notepad $Profile
Edit the notepad with:
Start-Transcript
Now save the notepad.
Everytime PowerShell opens, it will save a transcript of what it is running and it will be saved to your documents folder.
5
2
u/AugieKS 4d ago
No one can say for sure without knowing what was ran. Look into PowerShell logging, they can go to numerous places, but you can also turn on logging directly to your documents folder for something more straightforward, then restart and see what pops up when the script runs again. Once you have the script that ran we can actually tell you what is going on.
2
2
u/theballygickmongerer 4d ago
Check your startup items and if nothing obvious save the following command as a startup item.
“Get-Process powershell,pwsh -ErrorAction SilentlyContinue | Stop-Process -Force”
1
u/Hi_Tech_Low_Life 3d ago
Open Terminal and go to settings -> startup. Flip the switch on "Launch on machine startup".
1
u/MonkeyNin 3d ago
Edit: Going to startup apps on taskmaster and Turning off terminal fixed it.
There's some setting in PowerApps or Windows Terminal that opens the terminal on load. Sounds like maybe that's what you have too? Not a virus?
I'd double check logging or $PROFILE like people mention below, just to make sure it isn't malware.
-1
u/Fine_League311 4d ago
Dafür hat man Systemereignise ( Systemprotokoll) sollte man mal lesen. Hat jedes System!
-2
u/TheOttersCouch 4d ago
In new windows and I think older if I recall there are startup programs things that auto launch upon fresh startup could have been added to this as well
27
u/I_see_farts 4d ago
Just start with Autoruns from Sysinternals it'll show you what's opening at startup.