Home

Deleting Stale Objects. Bulk Devices Actions

%3CLINGO-SUB%20id%3D%22lingo-sub-156004%22%20slang%3D%22en-US%22%3EDeleting%20Stale%20Objects.%20Bulk%20Devices%20Actions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-156004%22%20slang%3D%22en-US%22%3E%3CP%3EDoes%20Intune%20support%20any%20ways%20of%26nbsp%3B%20deleting%20of%20stale%20device%20objects%20or%20otherwise%20the%20bulk%20deleting%20computer%20objects%20from%20Intune%3F%20%26nbsp%3BI%20know%20from%20the%20AzureAD%20preview%20module%20you%20can%20use%20remove-azureADdevice%2C%20but%20does%20this%20cleanly%20remove%20the%20device%20in%20Intune%20as%20well%3F%26nbsp%3B%20Is%20there%20a%20better%20way%20to%20manage%20devices%20en%20masse%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-156004%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EIntune%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMobile%20Device%20Management%20(MDM)%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-159724%22%20slang%3D%22en-US%22%3ERe%3A%20Deleting%20Stale%20Objects.%20Bulk%20Devices%20Actions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-159724%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20James%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Enothing%20built%20in%20so%20you%20need%20to%20take%20care%20of%20your%20own.%20You%20can%20run%20PowerShell%20scripts%20against%20AzureAD%20and%20Intune.%20For%20AzureAD%20you%20have%20the%20AzureAD%20module%20and%20for%20Intune%20you%20can%20use%20the%20Intune%20API%20via%20Microsoft%20Graph.%20Some%20example%20scripts%20are%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fpowershell-intune-samples%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fpowershell-intune-samples%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EHope%20this%20helps%20for%20now.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Deleted
Not applicable

Does Intune support any ways of  deleting of stale device objects or otherwise the bulk deleting computer objects from Intune?  I know from the AzureAD preview module you can use remove-azureADdevice, but does this cleanly remove the device in Intune as well?  Is there a better way to manage devices en masse?

1 Reply

Hi James,

 

nothing built in so you need to take care of your own. You can run PowerShell scripts against AzureAD and Intune. For AzureAD you have the AzureAD module and for Intune you can use the Intune API via Microsoft Graph. Some example scripts are here: https://github.com/microsoftgraph/powershell-intune-samples

Hope this helps for now.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
Extentions Synchronization
ChirmyRam in Discussions on
3 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies