Forum Discussion
Robert Moir
Mar 06, 2019Copper Contributor
Managing Intune Device Categories via Powershell
Hi all, Looking for a bit of help with the Intune Powershell/graph interface. I'm trying to manipulate Intune Device Categories via Powershell, so that I can firstly correct devices that were pl...
Marco_Di_Silvestre
Nov 04, 2022Copper Contributor
Jannik_ReinhardHi Jannik, thank you very much for your post. I hope you can still help me with a problem: I have to update the device category for about 500 devices of my company and these must be selected for a string present in the device name. For example, if the name of the device is "computer1-not" the category must be "pc laptop", in this case if the query finds the string "-not" in the name it must associate the category "pc laptop" to the device . How can I modify your script to achieve this? Thanks so much for the invaluable help. Marco
Jannik_Reinhard
Nov 04, 2022Iron Contributor
I have created a new script for you. This includes an filter. Depending of this filter is true or false other categories will be set. Hope this help you. Please let me know if you need some support.
https://github.com/JayRHa/Intune-Scripts/blob/main/Change-DeviceCategory/Change-DeviceCategoryMulti.ps1
https://github.com/JayRHa/Intune-Scripts/blob/main/Change-DeviceCategory/Change-DeviceCategoryMulti.ps1
- Marco_Di_SilvestreNov 04, 2022Copper Contributor
Jannik_Reinhard thank you very much, I really appreciate your help. I'll try your script and let you know if all work fine.
Thanks!
Marco