Introduction to PowerShell Commands in Microsoft Defender
Microsoft Defender comes with advance security features
Get-MpComputerStatus: let say you want to have a quick overview of the status of Microsoft Defender, you may open the Microsoft Defender and check settings and status. However, this command will give you overview of status of Microsoft Defender. It is useful for troubleshooting like you want to check status for a remote device quickly and guide them through troubleshooting steps and even write additional code like check values and show some customize warnings and so on.
Update-MpSignature: update is really important in the Anti-Malware products and you may use this command to perform operations related to update
Start-MpWDOScan: this command will run scan with Microsoft Defender Offline and basically it will restart the device and run scan before Windows boot up and then restart and show result. For example, consider a case when you detect a behavior which required Microsoft Defender Offline to remove it. In this case, you may write scripts like when you observed certain behavior, then run scan with Microsoft Defender Offline. It is helpful when you observe behaviors related to bootkit and rootkits. Consider you observe communicating with a malicious server and you want system to perform this operation.
Start-MpScan: this command will perform scan and you could define to scan Full, Quick or Custom scan. This is helpful when you want to perform a conditional scan, for example you want to perform scan when special condition reached.
Get-MpPreference: in case you want to see list of settings and policies which have been set in the Microsoft Defender, you may use this command. This is good to see if the policy you set or change you made is working or compare this result with the one you set in group policy to confirm your expected policies have been enforced in the endpoint.
Set-MpPreference: This is really valuable and helpful command and when you want to modify setting and policies
Remove-MpPreference: let say you set a command or policy and you want to remove it, then you may use this command to remove the policy or command.
Get-MpThreatCatalog: this command will list threat catalog which are available in the Microsoft Defender. Sometimes you might ask if the threat is being detected by Microsoft Defender or not and you know the name or ID and you may use this command to view it.
Recommended by LinkedIn
Get-MpThreat: this command will show history of malwares detected in the system; it is similar to checking the history in the Microsoft Defender.
Remove-MpThreat: this command will remove malwares active in the device. This is to perform action command to remove threats.
Get-MpThreatDetection: this command will show active malwares in the system and the malwares which has been detected.
In general, Get- will return values and data, Remove- is to remove and reset, Set is to define or initial and Start- is to start the operation. You may use these commands to create customize scripts
Reference: