@Shashi Shailaj I follow this procedure: https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/configure-endpoints-script?view=o365-worldwide
I am onboarding a Windows 10 ver.20H2. The script i am running is the one downloadable from MS Defender Security center for Windows (see screenshot). I run as Administrator my command prompt. I believe the script contains both Powershell and Registry commands.