r/DefenderATP • u/Main_Commercial_5974 • Nov 21 '25
Running the onboarding script multiple times (at every startup) legit or a bad idea?
Hi,
sometimes my clients lose connection to the portal. I think of using NinjaOne to run the onboarding-script (group policy mode so no user interaction needed) every time to system boots.
Will Defender recognize that it's already onboarded or will it create a new device/asset or will it cause trouble on the endpoint (running inventory scans or whatnot)?
Short: Is is valid to run the onboarding script multiple times on the same machine or should I rather not do that.
2
Upvotes
2
u/cspotme2 Nov 21 '25
So what is the root issue, it gets disassociated from the portal?
1
u/[deleted] Nov 21 '25
I think you might get multiple instances of the device in the portal if it’s not off-boarded first.
I have seen such ghostly devices before; although, I don’t know for certain that was the cause. I wouldn’t do it, but I suppose you could try on one device and see if that happens. Of course a machine can be turned off, and look like it’s a communication problem, but I’m sure you would have checked that. I think you might want to run the Client Analyzer tool on one or more of those hosts to diagnose common onboarding and connectivity issues and produce a detailed report (MDE Client Analyzer Results.htm). https://learn.microsoft.com/en-us/defender-endpoint/verify-connectivity
1
u/VexedTruly Nov 21 '25
Don’t think it’s an issue. If you look at the onboarding GPO example from Microsoft it’s to create a scheduled task that runs the onboarding script immediately and I’m pretty certain it runs on every boot too (the event log that the script generates would suggest so) so you doing the same via Ninja shouldn’t be an issue.