Forum Discussion
Script for SCCM Help please
- Feb 28, 2022
This link will help you to add a device to a collection during your OS deployment via Task Sequence.
Add a Device to a Collection during a Task Sequence (smsagent.blog)
After you add that step your task sequence, You can add a WMI query for define HP EliteBooks on options tab.
I think that will solve your problem.
hasanemresatilmis Thank you for this script. The only thing I am a little confused is about the bitlocker. What I want to do is build the machines as normal no matter what machine we use without any bitlocker and then all the machines will go into a device collection group called All desktop clients. (Screen shot) But then at the end of the build process i need to run a script that says if this machine is a HP Elitebook machine move this to the HP Elitebook 830 G8 device collection group. Because we already have a collection configured that will encrypt the machines if they are in this device group.
this is the screen shots.
So device collections are as follows
So if i can get a script that will run at the end of a build that will either run the wmic csproduct get name then if this is HP elitebook move to the device collection group called HP elitebook 830 G8. Hope this is possible and appreciate your help on this.
- ToptechnicalSolutionsFeb 25, 2022Copper Contributor
this is the query
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_COMPUTER_SYSTEM ON SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId WHERE SMS_G_System_COMPUTER_SYSTEM.Model like "%HP EliteBook 830 G8 Notebook PC%"
- Feb 25, 2022
- ToptechnicalSolutionsFeb 25, 2022Copper ContributorIt is at 2 as we have manually moved the machines into the device collection.