SCCM 2012 Client Deployment via GPO and SCCM Server 2012

Hi,

I have deployed the SCCM 2012 for a customer the deployment was very smooth but i got some issues in the client push out of 1000 clients there are around 400 machines which are having some problems.

So i am planning to deploy SCCM client through GPO.

If i deploy the SCCM Client through GPO does it reinstall the SCCM Client on the machines which already got the agent installed and working fine?

Regards,

M

July 4th, 2013 12:53pm

Hi,

Below is a vbs script that will first check whether ccmexec.exe exist in C:\Windows\CCM. If yes, skip the installation. If no, proceed the installation.

First, copy the client folder and share the folder. Modify str_SiteCode, str_InstallString.  

Option Explicit
On Error Resume Next

Dim oShell, objFSO, objFile1, objFile2, ADSysInfo, CurrentUser, wshNet, oSMSClient
Dim sysdir, compname, username, strGroups, sitename, strDiscoverSite, strTemp, message
Dim str_SiteAssignmentText,str_SCCMInstallLogFile ,str_InstallString, str_SiteCode

 

Set wshNet = CreateObject("WScript.Network")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set oShell = WScript.CreateObject("WScript.Shell")
sysdir = oshell.ExpandEnvironmentStrings("%systemroot%")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Const ForAppending = 8

'/////////////////////////////////////////////////////////////////////////////////////////////////////////////
'
' KEY IN YOUR PARAMETERS HERE

 

str_SiteCode = "XXX"
str_InstallString = "\\SERVER.domain.com\Client\ccmsetup.exe SMSSITECODE=XXX /source:\\SERVER.domain.com\client /mp:SCCMSERVER.domain.com FSP=SCCMSERVER.domain.com"

 

'
'
'/////////////////////////////////////////////////////////////////////////////////////////////////////////////

    ' Check whether or not ccmexec.exe file exists, if yes return client site assignment for checking
    If objFSO.FileExists(sysdir & "\ccm\ccmexec.exe") Then
 'Wscript.echo "Agent already installed " & sitename
 Set oSMSClient = CreateObject ("Microsoft.SMS.Client")

 sitename = oSMSClient.GetAssignedSite
        If err.number=-2147221502 then
           sitename = "Not assigned"
 End If

 If sitename <> str_SiteCode  then
    'Wscript.echo "Current site assignment is " & sitename
    'strDiscoverSite = str_SiteCode
    'Call SetAssignedSite (strDiscoverSite)
    'Wscript.echo "Installing the Client now " & sitename
    oShell.Run str_InstallString
    WScript.Sleep 5000

    'strTemp = oSMSClient.GetAssignedSite
    'If LCase(strTemp) = LCase(strDiscoverSite) Then
     'message = "Successfully assigned site code to " & strDiscoverSite
    'Else
     'message = "Unable to set assigned site code to " & strDiscoverSite & ". Attempting WMI repair"
     'Call RepairWMI

    'End If


 End If

 Set oSMSClient=Nothing

    Else

         set objFile2 = objFSO.OpenTextFile(str_SCCMInstallLogFile, ForAppending, true)
         compname = oshell.ExpandEnvironmentStrings("%computername%")
         username = oshell.ExpandEnvironmentStrings("%username%")
  'Wscript.echo "Installing the Client now " & sitename
         oShell.Run str_InstallString


    End If


Sub SetAssignedSite (SiteCode)
 'Wscript.Echo "About to assign site code to " & SiteCode
 oSMSClient.SetAssignedSite SiteCode,0
End Sub

Sub RepairWMI
 'Wscript.Echo "Attempting to repair WMI"
 oShell.Run "rundll32 wbemupgd, UpgradeRepository"
End Sub

Regards,
Hau

Free Windows Admin Tool Kit Click here and download it now
July 4th, 2013 1:57pm

Hi,

I almost Always use this excellent script from Jason Sandys, it can also install hotifxes for the client during installation and much more: http://blog.configmgrftw.com/?page_id=349

Regards,
Jrgen

July 4th, 2013 3:02pm

Hi,

Thanks for the script, i have a situation.

I got two version of clients running in the environment.

SCCM 2007 clients which are still connected to Old SCCM Server.

SCCM 2012 clients which are connected to New SCCM Server.

So i just want to enforce GPO deployment to the machines with SCCM 2007 Clients and the machines which don't have the client installed at all, please suggest.

Regards,

Maqsood

Free Windows Admin Tool Kit Click here and download it now
July 5th, 2013 12:47pm

Hi,

First, we talk about the client default installation location,

SCCM 2007 is %Windir%\System32\CCM\ folder or the %Windir%\SysWOW64\CCM\ folder

SCCM 2012 is %Windir%\CCM

Hence, the script can deploy to all computers. Then the script will check whether ccmexec.exe found in %Windir%\CCM. If yes, skip. If no, install.

Regards,
Hau

July 8th, 2013 7:40am

Hi,

The problem is identified it is the configuration of the Root CA which is not configured with CDP and the CRL not published.

We had the Offline Root CA & Enterprise Subordinate CA.

So we have to do the following.

1 - Bring up the Offline Root CA.

2 - Configure the CDP & publish CRLs.

3 - Issue a new certificate to Enterprise Subordinate CA.

4 - Install new certificate from Root CA on Enterprise Subordinate CA.

5 - Issue new certificate to all of the services in Domain ex. Exchange, Lync, SharePoint, etc...

6 - Reonroll the certificate for all the clients.

Regards,

Maqsood

Free Windows Admin Tool Kit Click here and download it now
July 31st, 2013 6:43am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics