how to disable powershell

Page 1 of 2 12 LastLast

  1. Posts : 355
    windows 10 pro x64 21H1
       #1

    how to disable powershell


    I unticked it in windows features,
    but if I type "powershell" in search box, I get two versions of it, and they both execute.
    So how do I disable this thing?

    While we are at it, how can I disable other exploitable processes that the standard Windows user doesn't need?
      My Computers


  2. Posts : 5,171
    Windows 11 Home
       #2

    I disable it by Taking Ownership and removing all users from those folders. You can easily re-enable it by adding a user.

    C:\Program Files (x86)\WindowsPowerShell
    C:\Program Files\WindowsPowerShell
    C:\Windows\System32\WindowsPowerShell
    C:\Windows\SysWOW64\WindowsPowerShell

    I used to remove it, but some windows updates re-install it.

    You definitely have to disable Windows Script Host (used for executing scripts via .JS, .JSE, .VBS, .VBE)
    reg add "HKCU\Software\Microsoft\Windows Script Host\Settings" /v "Enabled" /t REG_DWORD /d "0" /f
    reg add "HKLM\Software\Microsoft\Windows Script Host\Settings" /v "Enabled" /t REG_DWORD /d "0" /f

    POC: A closer look at the Locky ransomware
    Attached Thumbnails Attached Thumbnails how to disable powershell-capture_08152016_174005.jpg  
    Last edited by Brink; 15 Aug 2016 at 17:59.
      My Computer


  3. Posts : 355
    windows 10 pro x64 21H1
    Thread Starter
       #3

    TairikuOkami said:
    I disable it by Taking Ownership and removing all users from those folders. You can easily re-enable it by adding a user.

    C:\Program Files (x86)\WindowsPowerShell
    C:\Program Files\WindowsPowerShell
    C:\Windows\System32\WindowsPowerShell
    C:\Windows\SysWOW64\WindowsPowerShell

    I used to remove it, but some windows updates re-install it.

    You definitely have to disable Windows Script Host (used for executing scripts via .JS, .JSE, .VBS, .VBE)
    reg add "HKCU\Software\Microsoft\Windows Script Host\Settings" /v "Enabled" /t REG_DWORD /d "0" /f
    reg add "HKLM\Software\Microsoft\Windows Script Host\Settings" /v "Enabled" /t REG_DWORD /d "0" /f

    POC: A closer look at the Locky ransomware
    thanks
    how to add those reg entries?
    Last edited by Brink; 15 Aug 2016 at 17:59.
      My Computers


  4. Posts : 5,171
    Windows 11 Home
       #4

    Just open CMD as admin and copy/paste/enter.
      My Computer


  5. Posts : 355
    windows 10 pro x64 21H1
    Thread Starter
       #5

    TairikuOkami said:
    I disable it by removing all users from those folders. Y

    C:\Program Files (x86)\WindowsPowerShell
    C:\Program Files\WindowsPowerShell
    C:\Windows\System32\WindowsPowerShell
    C:\Windows\SysWOW64\WindowsPowerShell

    I used to remove it, but some windows updates re-install it.
    thanks
    and how to remove all users? I think I did it wrong. I removed access for all users, but powershell still executes...
    windows 10 x64
      My Computers


  6. Posts : 5,171
    Windows 11 Home
       #6

    Sorry, it seems, that I was wrong, very wrong. It still has to be removed in order to prevent it from running.
    I guess I should thank you, without you, I would have never found out. Now to check time to time, if it is still out.
      My Computer


  7. Posts : 355
    windows 10 pro x64 21H1
    Thread Starter
       #7

    TairikuOkami said:
    Sorry, it seems, that I was wrong, very wrong. It still has to be removed in order to prevent it from running.
    I guess I should thank you, without you, I would have never found out. Now to check time to time, if it is still out.
    no problem, now I got everything set up. the two powershell exe files are renamed, and windows script host is disabled through registry.
    the malware is going to be very disappointed if it visits me.
      My Computers


  8. Posts : 3,257
    Windows 10 Pro
       #8

    shmu26 said:
    While we are at it, how can I disable other exploitable processes that the standard Windows user doesn't need?
    What do you mean by "exploitable processes"? It's nor more exploitable than the command prompt. In fact, it has significant security above and beyond what Command Prompt offers to prevent exploits.

    Are you just trying to remove the ability for users to run it? If so, that can be done from Group Policy.
      My Computer


  9. Posts : 355
    windows 10 pro x64 21H1
    Thread Starter
       #9

    Mystere said:
    What do you mean by "exploitable processes"? It's nor more exploitable than the command prompt. In fact, it has significant security above and beyond what Command Prompt offers to prevent exploits.

    Are you just trying to remove the ability for users to run it? If so, that can be done from Group Policy.
    I am trying to make it harder for malware to do damage to my system, by disabling windows processes that are commonly abused by malware, and are not normally needed by a standard user. A prime example of this is powershell.
      My Computers


  10. Posts : 355
    windows 10 pro x64 21H1
    Thread Starter
       #10

    Mystere said:
    that can be done from Group Policy.
    could you explain how?
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 09:00.
Find Us




Windows 10 Forums