W4RH4WK / Debloat-Windows-10

A Collection of Scripts Which Disable / Remove Windows 10 Features and Apps
Other
6.03k stars 851 forks source link

Disable windows defender no longer works #220

Closed Synkstar closed 4 years ago

Synkstar commented 4 years ago

Import-Module : The specified module 'C:\Users\fgjgf\Desktop..\lib\force-mkdir.psm1' was not loaded because no valid module file was found in any module directory. At C:\Users\fgjgf\Desktop\disable-windows-defender.ps1:6 char:1

Import-Module : The specified module 'C:\Users\fgjgf\Desktop..\lib\take-own.psm1' was not loaded because no valid module file was found in any module directory. At C:\Users\fgjgf\Desktop\disable-windows-defender.ps1:7 char:1

Elevating priviledges for this process Elevate-Privileges : The term 'Elevate-Privileges' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\fgjgf\Desktop\disable-windows-defender.ps1:10 char:14

Trying to disable scheduled task Windows Defender Cache Maintenance

TaskPath TaskName State


\Microsoft\Windows\Windows Defender\ Windows Defender Cache Mainten... Disabled Trying to disable scheduled task Windows Defender Cleanup \Microsoft\Windows\Windows Defender\ Windows Defender Cleanup Disabled Trying to disable scheduled task Windows Defender Scheduled Scan \Microsoft\Windows\Windows Defender\ Windows Defender Scheduled Scan Disabled Trying to disable scheduled task Windows Defender Verification \Microsoft\Windows\Windows Defender\ Windows Defender Verification Disabled Disabling Windows Defender via Group Policies force-mkdir : The term 'force-mkdir' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\fgjgf\Desktop\disable-windows-defender.ps1:29 char:1

force-mkdir : The term 'force-mkdir' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\fgjgf\Desktop\disable-windows-defender.ps1:32 char:1

Set-ItemProperty : Cannot find path 'HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender\Real-Time Protection' because it does not exist. At C:\Users\fgjgf\Desktop\disable-windows-defender.ps1:33 char:1

Disabling Windows Defender Services Takeown-Registry : The term 'Takeown-Registry' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\fgjgf\Desktop\disable-windows-defender.ps1:36 char:1

Set-ItemProperty : Attempted to perform an unauthorized operation. At C:\Users\fgjgf\Desktop\disable-windows-defender.ps1:37 char:1

Set-ItemProperty : Attempted to perform an unauthorized operation. At C:\Users\fgjgf\Desktop\disable-windows-defender.ps1:38 char:1

Set-ItemProperty : Attempted to perform an unauthorized operation. At C:\Users\fgjgf\Desktop\disable-windows-defender.ps1:39 char:1

Set-ItemProperty : Attempted to perform an unauthorized operation. At C:\Users\fgjgf\Desktop\disable-windows-defender.ps1:40 char:1

Set-ItemProperty : Cannot find path 'HKLM:\SYSTEM\CurrentControlSet\Services\Sense' because it does not exist. At C:\Users\fgjgf\Desktop\disable-windows-defender.ps1:41 char:1

Set-ItemProperty : Cannot find path 'HKLM:\SYSTEM\CurrentControlSet\Services\Sense' because it does not exist. At C:\Users\fgjgf\Desktop\disable-windows-defender.ps1:42 char:1

Removing Windows Defender context menu item Removing Windows Defender GUI / tray from autorun

W4RH4WK commented 4 years ago

It's an import error, force-mkdir.psm1 could not be loaded. Ensure that you have downloaded everything, all files are okay, and you are closely following the README.

Synkstar commented 4 years ago

So now I am getting a different error

`Elevating priviledges for this process Trying to disable scheduled task Windows Defender Cache Maintenance

TaskPath TaskName State


\Microsoft\Windows\Windows Defender\ Windows Defender Cache Mainten... Disabled Trying to disable scheduled task Windows Defender Cleanup \Microsoft\Windows\Windows Defender\ Windows Defender Cleanup Disabled Trying to disable scheduled task Windows Defender Scheduled Scan \Microsoft\Windows\Windows Defender\ Windows Defender Scheduled Scan Disabled Trying to disable scheduled task Windows Defender Verification \Microsoft\Windows\Windows Defender\ Windows Defender Verification Disabled Disabling Windows Defender via Group Policies Disabling Windows Defender Services Set-ItemProperty : Attempted to perform an unauthorized operation. At E:\Debloat-Windows-10-master\scripts\disable-windows-defender.ps1:37 char:1

Set-ItemProperty : Attempted to perform an unauthorized operation. At E:\Debloat-Windows-10-master\scripts\disable-windows-defender.ps1:38 char:1

Set-ItemProperty : Attempted to perform an unauthorized operation. At E:\Debloat-Windows-10-master\scripts\disable-windows-defender.ps1:39 char:1

Set-ItemProperty : Attempted to perform an unauthorized operation. At E:\Debloat-Windows-10-master\scripts\disable-windows-defender.ps1:40 char:1

Set-ItemProperty : Cannot find path 'HKLM:\SYSTEM\CurrentControlSet\Services\Sense' because it does not exist. At E:\Debloat-Windows-10-master\scripts\disable-windows-defender.ps1:41 char:1

Set-ItemProperty : Cannot find path 'HKLM:\SYSTEM\CurrentControlSet\Services\Sense' because it does not exist. At E:\Debloat-Windows-10-master\scripts\disable-windows-defender.ps1:42 char:1

Removing Windows Defender context menu item Removing Windows Defender GUI / tray from autorun`

Synkstar commented 4 years ago

Actually nvm its disabled now....

Synkstar commented 4 years ago

Wait wait wait. Im testing it again in a vm and it doesnt work even will ll of the files. Might be because they moved things around

W4RH4WK commented 4 years ago

Okay, please try this again on a clean install, VM is okay:

  1. Download https://github.com/W4RH4WK/Debloat-Windows-10/archive/master.zip

  2. Extract everything into a new folder

  3. Start PowerShell with administrative privileges in that folder

  4. Run these commands:

    PS> Set-ExecutionPolicy Unrestricted PS> ls -Recurse .ps1 | Unblock-File PS> ls -Recurse .psm1 | Unblock-File

  5. Run the scripts you want to apply to your system

blamarche commented 4 years ago

Hey there, just wanted to mention as a potential cause... in recent versions of Win10 (home) I've had to change the first command I use or I get scope errors and the permissions aren't actually set, causing most subsequent commands to have errors: PS> Set-ExecutionPolicy Unrestricted -Scope CurrentUser or he could also try PS> Set-ExecutionPolicy Unrestricted -Scope Process

W4RH4WK commented 4 years ago

@blamarche Thank you, I'll add the -Scope CurrentUser part to the README, just in case.

@Smartjer123 Please try again with the first command changed.

W4RH4WK commented 4 years ago

I assume this issue has now been resolved.