Skip to main content

Worklet: Execute Defender Quick or Full scan


JasonG-Automox

This will allow you to run a Windows Defender scan on any or all of your machines at anytime. Only run this manually


• Under Evaluation Code:


If (Test-Path "$env:allusersprofile\SoftwareDistribution")

{

Exit 0



}

Else {

Exit 1

}


• Under Remediation Code:


<#

NAME

    Start-MpScan



DESCRIPTION

    The Start-MpScan cmdlet starts a scan on a computer. The cmdlet performs scans for the path you specify.



SYNOPSIS

    Starts a scan on a computer.

-ScanType [<ScanType>]

        Specifies the type of scan. The acceptable values for this parameter are:

        

        -- FullScan

        -- QuickScan

 Uncomment only one variable for scan to run either a fullscan or quickscan

 This will not work if you have Windows Defender disabled

#>

$Scan = 'QuickScan'

#$Scan = 'FullScan'



Start-MpScan -Scantype $Scan

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings