Installing SCCM agent on Server 2012 with Orchestrator

Update 1/30/2013: I don’t recommend this as a primary way to install the SCCM agent on computers now that there is a supported solution from Microsoft, this was just a temporary workaround until SCCM SP1 was released.

In this blog post I’m going to document the high level steps to get the SCCM agent (Pre beta 1) on Server 2012, Windows 8 and this can be used also as a secondary method to catch any machines that didn’t get the agent installed by client push or WSUS depending on your main deployment method for the client.

Step 1. Create collection in SCCM for clients without an installed agent.

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 where SMS_R_System.Client = 0 or SMS_R_System.Client is null

I also excluded some collections to removed objects that I know should not get agents (exp. Cluster objects and OSX machines that have been joined to the domain)

Step 2. Create a collection for failed objects and excluded this collection from the 1st collection (if you want to try the install more than once, you can modify this)

Step 3. Create a new runbook in orchestrator

clip_image002[4]

The first activity you need is a “Get Collection Members” from the SCCM 2012 IP

clip_image004[4]

The second activity is a .net Script from the system IP that we run the following powershell script

$SCCMServer = “Variable with the SCCM Server Name”

$destServer = “Published data Member Name from Get objects from non Client Collection”

$alive = Test-Connection -ComputerName $destServer -Quiet

if ($alive) {

$destshare = “\\”+ $destServer +”\C$\”

$SCCMshare = “\\”+ $SCCMServer +”\SMS_LH2\Client\”

Copy-Item -Path $SCCMshare -Destination $destshare -Recurse

start-sleep 15

$wsman = New-PSSession -ComputerName $destServer

Invoke-Command -ScriptBlock {cd c:\client; start-process ccmsetup.exe} -Session $wsman

}

else { $poweredoff = $destServer}

clip_image006[4]

clip_image008[4]

The last activity needs to be connected with a custom link

clip_image010[4]

Add the add collection rule activity

clip_image012

You can either add a monitor data time at the start of the runbook to check for new clients in the collection or use another scheduling utility.

This works in my environment but may need a few small tweaks since i have not added much error handling.

Advertisements
This entry was posted in Powershell, SCCM, SCO, Server 2012, Win8 and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s