r/PowerShell • u/Alskaeer163 • May 26 '24
Hello i deleted default powershell from system32 labeled 1.0 can i somehow restore it without reinstaling windows ?
29
u/jrodsf May 26 '24
Try:
sfc /scannow
In an elevated command prompt.
28
18
11
u/gordonv May 26 '24
Check this out.
But like /u/ollivierre said, you should probably just blow it away with a reinstall. Backup your important files or use something like Acronis to do a full backup to an external HDD.
Blowing away an install not only fixes the problem at hand, but fixes edge cases you were not aware of.
1
u/Alskaeer163 May 26 '24
Thanks I'll just reinstall windows
2
u/xbullet May 27 '24
If you suspect you might have picked up some malware, this is the safest option.
3
u/xtheory May 26 '24
What were the contents of said sketchy batch file? Would be good to know to determine if it was malicious? You can right click it and select Edit.
3
2
u/ollivierre May 26 '24
Treat them like cattle not like pets. but you could technically Copy it from another machine is probably the easiest.
1
u/iwinsallthethings May 27 '24
Treating them like cattle does not mean put it down at first sign of sickness. Treat if easy, then put down.
1
u/_BL810T May 27 '24
Would an in place upgrade not work? Get a windows iso on a usb and run the setup from inside your OS
1
u/StConvolute May 27 '24
You could try removing the PowerShell features and reinstalling them? Otherwise I'd be looking as reading up on DISM commands, maybe use that as a feature install path?
1
u/Lonely_Ad8964 May 27 '24
Don't simply reinstall windows. Wipe the drive using the BIOS tool and then reinstall windows from DVD
48
u/BlackV May 26 '24
why are you touching ANYTHING in
windowsorwindows\system32(actually I'msurprisedAmazed! it actually let you do that in the first place)you want /r/techsupport or /r/windows