Fix Microsoft Defender for Endpoint Service Name Is Invalid Error
Question details
The user needs to resolve an onboarding issue where the Microsoft Defender for Endpoint service fails to start due to an invalid service name error.
- Product
- Microsoft Defender for Endpoint
- Device & OS
- Windows
- Scenario
- Running the command prompt onboarding script to deploy Microsoft Defender for Endpoint.
- Observed behavior
- The system throws Error ID 15 stating the service name is invalid, and the Sense service is missing entirely from Services.msc.
Ensure you are running an administrative Command Prompt and verify that your Windows edition supports Defender for Endpoint, as Home editions are not supported.
Install the Missing Sense Client Capability via DISM
Use this method when the Microsoft.Windows.Sense.Client component is missing, preventing the service from registering correctly.
The 'invalid service name' error (Error ID 15) usually occurs because the core Windows capability required for Defender for Endpoint (Sense Client) is not installed on the system. You can query and add this capability using the Deployment Image Servicing and Management (DISM) tool.
Click the Start menu, type 'cmd', right-click on Command Prompt, and select 'Run as administrator'.
Type the command: DISM.EXE /Online /Get-CapabilityInfo /CapabilityName:Microsoft.Windows.Sense.Client and press Enter. If the state says 'Not Present', proceed to the next step.
Type the command: DISM.EXE /Online /Add-Capability /CapabilityName:Microsoft.Windows.Sense.Client and press Enter. Wait for the operation to complete to 100%.
Once the installation finishes, re-run your Microsoft Defender for Endpoint command prompt onboarding script. The Sense service should now be recognized and start successfully.
Verify Windows Edition Compatibility
Use this step if the DISM command fails or if you are running a consumer edition of Windows.
Discover WPS Office for Your Productivity Needs
While resolving system integration issues, you may also be looking for a highly efficient and free alternative to Microsoft Office. WPS Office is a lightweight, all-in-one productivity suite that lets you easily manage your documents, spreadsheets, and presentations.
- 1. Visit the WPS Website: Navigate to the official WPS Office website on your browser.
- 2. Download the Installer: Click the 'Free Download' button to get the lightweight installation file.
- 3. Install and Launch: Run the installer, follow the on-screen instructions, and start using your free Office alternative immediately.

Frequently Asked Questions
What does Error ID 15 mean during Defender for Endpoint onboarding?
Error ID 15 indicates that the specified service name is invalid. In the context of Defender for Endpoint, it means the operating system does not recognize the 'Sense' service because the required Windows capability (Microsoft.Windows.Sense.Client) has not been installed.
Why is the Sense service missing from Services.msc?
The Sense service is missing because its core feature package (Features on Demand) is not present on the device. You must add it manually using the DISM /Add-Capability command in an elevated command prompt.
Does Microsoft Defender for Endpoint work on Windows 11 Home?
No, Microsoft Defender for Endpoint is not supported on Windows 11 Home editions. Attempting to deploy it on a Home edition will result in errors like the missing Sense service. You must upgrade to Windows Pro or Enterprise to use this feature.




