Invoke-IntuneCleanup script broken
Hello!
Just wanted to note that as a sysadmin, I was in need of a script to remove duplicate serial number entries from our Windows Devices list in InTune, and a search for a solution landed me here with the Invoke-IntuneCleanup script posted.
Unfortunately, it relies on the MSGraph API (Connect-MSGraph), which it seems Microsoft has replaced as of July, 2024 with Connect-MGGraph. This replacement doesn't seem to support any of the same commands for interacting with InTune?
The module also supports Intune but I would need to rewrite the whole script and this is currently not onnthe roadmap. But you can use my script as an idea and rebuild with the new module.
@twyrick1971 I created a PR here for using MgGraph. Feel free to use that code, they were pretty minor changes. I tested it a bit with -WhatIf but have not used this in production (I never used the script with MSGraph, so use with caution).
Thanks, I have now merged it to the main branch