Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

SOLVED String Limit for Query Device Collection

Status
Not open for further replies.

Brian Seppanen

New Member
Messages
3
Solutions
1
Reaction score
0
Points
1
I'm looking to automate the creation of some Collections using powershell. The intended collection is going to be query based on serial numbers. Does anyone know the string limit with query list. I've run into the limit previously and broke up a collection into smaller pieces to overcome, but I did not identify what the particular limit was.

i.e.: select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_PC_BIOS on SMS_G_System_PC_BIOS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_PC_BIOS.SerialNumber in ("A",.<somewhere here there is a character limit beyond which elements past this are ignored> ..."ZZZZZZZZZZZ")
 
Solution
I'm looking to automate the creation of some Collections using powershell. The intended collection is going to be query based on serial numbers. Does anyone know the string limit with query list. I've run into the limit previously and broke up a collection into smaller pieces to overcome, but I did not identify what the particular limit was.

i.e.: select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_PC_BIOS on SMS_G_System_PC_BIOS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_PC_BIOS.SerialNumber in ("A",.<somewhere here there is a character limit beyond which...
I'm looking to automate the creation of some Collections using powershell. The intended collection is going to be query based on serial numbers. Does anyone know the string limit with query list. I've run into the limit previously and broke up a collection into smaller pieces to overcome, but I did not identify what the particular limit was.

i.e.: select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_PC_BIOS on SMS_G_System_PC_BIOS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_PC_BIOS.SerialNumber in ("A",.<somewhere here there is a character limit beyond which elements past this are ignored> ..."ZZZZZZZZZZZ")
I completed the project by utilizing 1000 serial number entries in a single query, with a collection that used two queries, created multiple collections and aggregated those to a single group.
 
Solution
Status
Not open for further replies.

Forum statistics

Threads
7,132
Messages
27,852
Members
18,148
Latest member
therealLawrence
Back
Top