Well, I don't know everything that wouldn't work if you removed PowerShell, and that's kind of the point. Who knows what Windows or application functionality you're breaking by removing it? It's not like you're removing some word processing application you're not using; you're removing a component of Windows.
And if you're going to remove PowerShell and Terminal, better remove cmd for the same reason. I've done plenty of bad things at a command prompt.
And what's your take on cmd being as dangerous for malware as PowerShell?
Not trying to make a war of opinions, tbc, I just try to understand all perspectives to make my own :)
Not having an antivirus program would be like that dream you have of going to school in your pyjamas - horrendous.
Can't be done I'm afraid (for me anyway).
Note that by default Windows includes old and vulnerable PowerShell 5, though there is already version 7.
Removing version 5 can break some apps and some features, but it is well worth it. You can also restrict it.
So, I tried your tweaks, after all I am going to install Windows from zero now on a new SSD so I can do experiments in this SSD
But could you please please explain a bit more in detail what they do exactly?
So I can feel safer about implementing them in the new installation.
Btw, I have entered all that in Windows Terminal (administrator) and it said "The operation completed successfully" for each of the commands, and then I restarted, but Powershell is still in the system, I can access it and use it.
Well, now tbh when I enter a command either in the PowerShell or in Windows Terminal, it's not in colors anymore. So, does that mean that PowerShell has been "disabled", and now when I open Terminal or Powershell it's CMD what is working within them?
Is that enough to prevent Ransomware? I mean, I thought that the idea was to prevent the execution of commands in PowerShell, but now PowerShell can still be opened, and commands can be executed, just in B&W instead of color
Also, stupid question, what should i put in the last code in the place of %USERPROFILE%?
Let's say that my User in Windows is XYZ, I've tried XYZ\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell\Windows PowerShell.lnk and %XYZ%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell\Windows PowerShell.lnk and none of them worked...
CMD is very limited compared to PS, thus the reason MS started using PS instead.
Malware can use PS to elevate and then it can do anything, like change firewall rules.
I believe Terminal uses PS and you can not remove PS, while running it. Use CMD as admin.
If PS is removed, those 4 folders should not exist. You can easily restore it using SFC scan.
CMD is very limited compared to PS, thus the reason MS started using PS instead.
Malware can use PS to elevate and then it can do anything, like change firewall rules.
You can elevate PowerShell or cmd and change firewall rules: netsh.
Edit: One thing I've not mentioned... even if you remove PowerShell, it's still possible to run PS scripts and commands. There's a project called PowerLine that's made specifically for this, and other similar things exist. I won't link to PowerLine because it's known to be used maliciously. Point is, you're not really gaining anything by removing it.
Microsoft Edge WebView2 Runtime
...
I believe Terminal uses PS and you can not remove PS, while running it. Use CMD as admin.
...
Start - Run - %USERPROFILE% - will open your profile folder, you do need to use your username.
Ok, I did it again from CMD (admin) and now it's really gone, no PowerShell, no Windows Terminal.
I used the code how it was. Or was I supposed to change %WinDir% with C, %username% with my username, and %computername% with my computer name?
About the user profile thing, I thought I had to use it in CMD too, that's why when it didn't recognize the command I tried changing USERPROFILE with XYZ (my hypothetical username).
Now I did it in run like you just said and it says that the path doesn't exist.
Maybe because your other codes deleted it?
What am I supposed to do?
Now that PoweShell and Terminal are gone I'd like to have CMD in the right click menu of the Start key, like you said that this string would do
____________________________________________________________________________________________________________________________________________
Malware nowadays is not the days of windows xp practically shouting at the screen saying I'm infected! I'm infected!
It is much more sophisticated and complex than that. Malware does everything it can to hide the infection and make you not aware it's even there. Malware can be in your router, in your computer, anywhere you go.
You need an active antivirus. You don't need to pay for it. Windows defender is fine for most folks. Using preventive software and keeping windows up to date is a must. However, it is true that in general, windows is much more secure than it has ever been. Setting UAC to its highest level, using memory integrity, and setting a secure dns is some extra stuff that really helps for sure.
But don't ever assume your machine is not infected because everything seems fine, or you don't notice anything wrong. Because that's the point.