Link to home
Start Free TrialLog in
Avatar of rmessing171
rmessing171Flag for United States of America

asked on

SCCM 2007 - Import CSV to Populate Collection

I have a list of 186 computers all currently registered in SCCM 2007 with Client=YES and Active=YES.  I would like to add all 186 computers to a new Collection named HP TEST.  I have a CSV file in the Computername, SMBIOS GUID format listed below:


TEST1-LPTP,8057197D-5008-11E4-B1B5-C5E6F40280E1
TEST2-LPTP,76D1C2D7-5008-11E4-95A3-C5DE5C0D5006
TEST3-LPTP,BE0E6F42-474F-11E2-843B-A3C45F06007A

It seems that I am successfully importing the CSV file correctly via Operating System Deployment> Computer Association> Import Computer Information, however after I perform an "Update Collection Membership" on the HP TEST collection, it shows no computers and is empty.  Any thoughts?  Is there somethings I check?
Avatar of yo_bee
yo_bee
Flag of United States of America image

You do not need or should have to import any items via CSV if they are already in the CCM System.  You will need to create a Query to find all Items/Objects that meet the query crietera.

Here are the steps you need to follow.
Step1: Locate the Collection and Right Click > Properties
User generated image
Step2: Select the New Query Wizard Button
User generated image
Step3: Import a stanard Query from SCCM.
Name it
Press Import and select from the list (I recommend ALL CLIENTS SYSTEMS)
User generated imageUser generated image
Step 4: Edit the Query
Press Edit Query Statement

User generated image
Step5: Select the Tab that says Crietera and press the New Crietera Button
User generated image
Stepg: Select the Attributes.
Attribute Class: Select Computer System
Alais: leave alone
Attribute: Name
User generated image
Step7: Criterion Properties. This is how you will filter
Criterion Type: Leave as Simple Value
Where: Should say Computer System - Name (created From the Previous Step)
Operator: is Like
Value: Test% (this is a wild card value for any computer name that starts with Test)
User generated image
Step8: You should see the new Creitera appended.
Option: Press Show Query Language if you want to see what the SQL statement looks like.
Press OK
User generated image
Step9: Option if you want to edit the creitera press the icon with the hand next to the new query wizard button then repeat the previous steps
User generated image
Avatar of rmessing171

ASKER

Thank you for this info, however it is not going to help me because all of the computernames in my company are all named entirely unique.  I thought there was a way I could import a CSV file with computernames into a specified collection?
is there anything that is common between these machines.
OU's, Model, makes.  Anything that can be queried?
Unfortunately not.  I also deploying a package in phases to 50 laptops at a time.  Importing a CSV file of computernames would be ideal.
You have stated that your imported them during the OS Deployment with the Name TEST1 , TEST2, Etc...
Is that right?
Thank you for the quick reply.  I have a CSV file with the computername and each computername's associated SMBIOS number.  The CSV file looks like below:

TEST1-LPTP,8057197D-5008-11E4-B1B5-C5E6F40280E1
TEST2-LPTP,76D1C2D7-5008-11E4-95A3-C5DE5C0D5006
TEST3-LPTP,BE0E6F42-474F-11E2-843B-A3C45F06007A

When I perform the import of the file, it looks like it is importing the information, however when I look at the Collection I specified to import to, the computernames are not present.
My questions is "Do all the computers start with Test? as your example illustrate."
Unfortunately not they do not start with Test in the computernames.  The TEST computernames for only for my lab.  All of the computernames in PROD are tied to the user's initials.
Not sure what your goal is then with the production machines?
Is there an OU that you can use as a filter?
could you post the CSV.
You could created a new AD group and import the computer objects into the group using power shell.  Once the group is populated you can query the security group in SCCM to add to the collection.

I will post the Power shell script tomorrow.
Are you still interested is assistance with this issue?
Avatar of dadiehl04
dadiehl04

i need to create a collection as well .. without using a query from sccm.
i have a list of users that are unique to HR database.. sccm cannot query on their properity.. so i thought i could IMPORT A TARGET LIST of users and make that a collection..

which seems to be difficult.

In landesk, we used a tool to convert a csv into a query statement, saved it as xml, then imported it into landesk, viola, instand query statement.  I'm not on a landesk box, i'm just saying the BUSINESS NEED is there and it's hard to believe sccm techs don't have a graceful solution.

It's vain to think that sccm can query on anything.. and that we don't NEED an alternative way to populate a list of devices or users we want to target with an action like an inventory report or an app deployment.

furstrated but still hopeful :)

and interested in powershell script as mentioned above.
$ ?
Here is an option can you create a security group using powershell from your list in AD?
If so then you can leverage SCCM auditing of AD to create the collection based on security groups.

We do that in our environment.

Does that sound like a viable solution then you update the security group as needed to address the collection.
you bet.. thanks.. that seems to be the way to handle this kind of scenerio.

Thanks!
do you need help with the script.
i don't see your script posted
ASKER CERTIFIED SOLUTION
Avatar of yo_bee
yo_bee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yep.. i was wondering how to "award a right answer" since i wasn't the poster.. i understand...

on the script.. i'll check w/ domain services in my company.. i'm sure they have a script already... I work DESKOP/SCCM and don't typically have rights to AD groups :)

thanks for your help.. will open a new thread as you suggested
No Problem.

If you do come up with the question that is relevant to this one and you want help I will be more than happy to assist.

One the comment about rights.
If you do not have rights to create the group or add then as script will be useless until get  DS group to create a group and make you a delegate so you can update this group on a need be basis.

Does that help at all?
yep.. thanks.. we use dra's Netiq which is just a bundle of joy to manage our AD groups.  I'm not sure command lines work over netiq ... i can become a delegate or "peak over someone's shoulder that has rights" to get it done.
Sorry for the delay, but I am still having an issue importing from a CSV file to a Collection.
What is the issue?
I see that you gave me points for the second part of the questions 39833401,
Hi All,

I have a list of computers named uniquely. how can I create collection? do I have option to Import as a excel file?

Regards,
Nalla
Did you see my solution that was accepted
https://www.experts-exchange.com/questions/28356291/Adding-300-users-to-a-collection-in-sccm.html 

Do you have SQL scripting knowledge?  You could add a custom table to SCCM DB, import the CSV data then build a query, but I have not done this and would recommend that you backup the database prior to do any modifications to  it.

If you rather send me a Private Message to continue this conversation rather than post to an already closed question I am open to that.