Side Quest - Defender For Endpoint #Episode 3

Side Quest - Defender For Endpoint #Episode 3

Topics Covered: Onboarding Machines using Defender for Endpoint

In this article, we will be performing the following activities:

Task 1: Onboard Windows 10 device

Task 2 : Run Detection Test

✔️Architectural Diagram:


✔️ Task 1: Onboard Windows 10 device


In this task, We will onboard Windows 10 device to Microsoft Defender for Endpoint using an onboarding script.

Note: This is an anticipated delay in the Microsoft Defender portal, which sometimes takes longer than expected to display the Endpoints.

  • Select Onboarding (2) under the Device Management section.

Note: You can also perform device onboarding from the Assets section of the left menu bar. Expand Assets and select Devices. On the Device Inventory page, with Computers & Mobile selected, scroll down to Onboard devices. This takes you to the Settings > Endpoints page.


  • From the drop-down of Select operating system to start onboarding process, select Windows 10 and 11

  • In the "1. Onboard a device" area make sure under the connectivity type Select standard (1) and "Local Script (for up to 10 devices) (2)" is displayed in the Deployment method drop-down and select the Download onboarding package (3) button.

  • Right-click the downloaded zip file and select Extract All, make sure that Show extracted files when complete is checked and select Extract.
  • Right-click on the extracted file "WindowsDefenderATPLocalOnboardingScript.cmd" and select Properties. Select the Unblock checkbox in the bottom right of the Properties windows and select OK.

  • Right-click on the extracted file WindowsDefenderATPLocalOnboardingScript.cmd again and choose Run as Administrator.

Note: If you encounter the Windows SmartScreen window, select on More info, and choose Run anyway.        
Note: When the "User Account Control" window is shown, select Yes to allow the script to run.        

  • Type Y to the question presented by the script and press Enter. When complete you should see a message in the command screen that says Successfully onboarded machine to Microsoft Defender for Endpoint.
  • Press any key to continue. This will close the Command Prompt window.

✔️ Task 2: Run a detection test

  • In this task, run the following PowerShell script on a newly onboarded device to verify that it's properly reporting to the Defender for Endpoint service.
  • Back in the Onboarding page from the Microsoft Defender portal, under the section "2. Run a detection test", copy the detection test script by selecting the Copy button.

powershell.exe -NoExit -ExecutionPolicy Bypass -WindowStyle Hidden $ErrorActionPreference= 'silentlycontinue';(New-Object System.Net.WebClient).DownloadFile('http://127.0.0.1/1.exe', 'C:\\test-WDATP-test\\invoice.exe');Start-Process 'C:\\test-WDATP-test\\invoice.exe'        

  • Open the command prompt as admin and enter this code and run it.

Note: The window closes automatically after running the script.        

  • Open the Microsoft Defender portal. In the left-hand menu, under the Assets area, select Devices (1). You can see the device that is onboarded. If the device is not shown, complete the previous task and come back to check it later. It can take up to 60 minutes for the first device to be displayed in the portal.

Note: If you have completed the onboarding process and don't see devices in the Devices list after an hour, it might indicate an onboarding or connectivity problem.
Note: Before, proceeding select Settings from the left menu bar, then from the settings page, select Endpoints, Select Onboarding under the Device Management section and make sure First device onboarded is Completed.

In the next article, we will be looking at End to End EDR that includes Incident, Alerts, Actions & Live Responses.


#DefenderforEndpoint #Cybersecurity #EndpointSecurity #MicrosoftSecurity #ZeroTrust #ThreatProtection #EndpointManagement #AdvancedThreatProtection #SecureTheEndpoint #SecuritySolutions #SecOps #InfoSec #CyberDefense #DigitalDefense#MicrosoftIntune #azurecloud #cloudcomputingservices#m365 #saas #Modernworkplaceengineer #EnterpriseSecurity #itinfrastructuremanagement #modernworkplace #digitalworkplace #ITSecurity #technologyisawesome #learningandgrowing #linkedinconnections #linkedincommunity #like #share #support


To view or add a comment, sign in

More articles by Richard Rex J

Insights from the community

Others also viewed

Explore topics