Importing New Computer RRS feed

  • Question

  • In SCCM 2007, there was a feature where I can import a computer using ImportMachineEntry method and then add a membership rule to collection SMS00001(All Systems Collection). Given below is the code snippet. But in 2012, the script is failing at AddmembershipRule method for AllSystems Collection(SMS00001). I see that in console, for AllSystems Collection, the option where you can add a rule is grayed out.

    Is it possible to add a rule to AllSystems Collection manually in 2012 ?. Is this the reason why my script could be failing ?

    Pls give me any ideas on how I should import a new computer.

    $staticRule["ResourceClassName"] = "SMS_R_System"
            $staticRule["ResourceID"] = [int]$result.ResourceID

    $filter = "collectionId='" + $ParentCollectionId + "'"
            $collection = get-wmiobject SMS_Collection -Filter $filter -computername $SCCMServer -credential $credentials -namespace $namespace

             if(-not $collection)
                throw "Failed to retrieve collection"

    Monday, May 28, 2012 12:40 PM

All replies

  • Because All Systems collection contains all computers, there is no need to add a new rule to this collection. Thus, you cannot create a new rule to All Systems collection with a script.

    When you import a computer to ConfigMgr 2012, it should appear automatically at All Systems collection.


    Tuesday, May 29, 2012 12:44 PM
  • Thanks Panu for the reply.

    According to the script given here for SCCM 2007  http://msdn.microsoft.com/en-us/library/cc143628.aspx , we do add a rule to the AllSystems Collection at the end. Why is it needed here ?

    So is it like for 2012, we don't need to add rule to the AllSystems Collection anymore after executing ImportMachineEntry method ?. 

    Also we could manually import a computer in SCCM 2007 using Import Computer Information under Operating System deployment -> Computer Association , where can I find the option in 2012 ?

    Tuesday, May 29, 2012 1:51 PM
  • "Assets and Compliance" -> Devices -> right click -> "Import Computer Information"

    Torsten Meringer | http://www.mssccmfaq.de

    Tuesday, May 29, 2012 3:26 PM
  • How to find the SMSBios GUID of a machine to be given as input for importing a computer ?
    Thursday, May 31, 2012 8:27 AM
  • in a device collection, select a computer, right click it and choose properties, scroll down to BIOS GUID from the list of available data.

    Step by Step ConfigMgr 2007 Guides | Step by Step ConfigMgr 2012 Guides | I'm on Twitter > ncbrady

    Sunday, July 15, 2012 7:09 AM