logo
search
Security Policy Errors

How to Fix Microsoft Defender for Endpoint Detection Test Incomplete

Maira MehtabMaira Mehtab Sep 28, 2026 869 views

Question details

The user needs to resolve an issue where the initial device detection test in Microsoft Defender for Endpoint remains incomplete despite the device being successfully onboarded to Intune.

How to Fix Microsoft Defender for Endpoint Detection Test Incomplete
Product
Microsoft Defender for Endpoint
Device & OS
not provided
Scenario
Running the initial detection test script after onboarding a device to Intune and Microsoft Defender for Endpoint.
Observed behavior
The detection test fails to complete, and the provided PowerShell command returns an error stating that 'Continue=' is not recognized.
Before you start

Ensure you have administrative privileges on the device and access to the Microsoft Defender Security Center. Verify that your device meets the minimum OS requirements for onboarding and has a stable internet connection.

Solution 1Recommended

Verify and Correct PowerShell Command Syntax

Resolve syntax errors caused by improper formatting or unintended line breaks when copying the detection script from documentation.

When copying commands from web pages or PDF documents, hidden formatting characters or line breaks are often introduced. This causes PowerShell to misinterpret commands, resulting in errors such as 'Continue=' not being recognized.

1
Copy the original script

Open the detection script documentation provided in the Microsoft Defender for Endpoint onboarding portal and copy the text.

2
Sanitize the formatting

Paste the copied script into a plain text editor like Notepad. This strips away any hidden HTML or rich-text formatting characters.

3
Check line breaks

Review the text for any unintended line breaks, especially around the 'Continue=' parameter. Ensure the command is on a single continuous line if the syntax requires it.

4
Run the command

Open PowerShell with Administrator privileges, paste the sanitized command, and press Enter to execute the detection test.

Verify and Correct PowerShell Command Syntax
Syntax check complete: Using a plain text editor to clear formatting is a best practice for executing any PowerShell scripts provided in technical documentation.
Free Microsoft Office alternative

Discover a Lightweight Alternative for Your Office Needs

While troubleshooting enterprise security policies requires specialized IT support, managing your daily documents shouldn't. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office, allowing you to edit Word, Excel, and PowerPoint files seamlessly without heavy system resource consumption.

  1. 1. Visit the official website: Go to the official WPS Office website to access the latest version.
  2. 2. Download the installer: Click the Free Download button matching your operating system.
  3. 3. Install and launch: Run the setup file and follow the quick on-screen instructions to start using your new workspace.
Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx) for seamless workflow.Lightweight installation that operates smoothly without triggering complex security policy conflicts.Free to use with a familiar, easy-to-navigate user interface that requires no learning curve.Built-in PDF editing tools for secure and efficient document management.
microsoft office alternative - wps office

Frequently Asked Questions

Why does PowerShell say 'Continue=' is not recognized?

This typically happens when the command is copied from a formatted document or webpage that introduces hidden characters, incorrect quotation marks, or unintended line breaks, which break the native script syntax.

How do I verify if my device is properly onboarded to Defender?

You can check the device inventory in the Microsoft Defender Security Center. If the device appears there with an active status, it has been successfully onboarded, even if the local detection test script is still pending.

How long does a Microsoft Defender detection test usually take to appear?

Once the PowerShell script is executed successfully, the alert should trigger and appear in the Microsoft Defender portal within a few minutes. However, slight delays can occur depending on network synchronization intervals.