locked
Best way to manually deploy the client and immediately force initial required reporting RRS feed

  • Question

  • Good morning all,

    Let me give you the situation i'm in here.  The school I manage purchases laptops by the hundreds-thousands.  We unbox them (already with our image), we run a script that renames it, joines it to the domain, and then installs the SCCM client.  Once ccmexec.exe / the sccm client are confirmed to be installed, we shut them down and put them in a cart...deliver to the teacher's rooms.  The carts are used per classroom with random students.

    The problem we're running into as we deploy these carts is that only 10-25 of the laptops are showing up for each cart.  

    What's the best way to:

    1) install the client manually
    2) force it to do all required reporting/syncing
    3) anything else required to finalize a healthy client?

    Any input on this is greatly appreciated.

    Thank you all!

    Friday, December 19, 2014 5:04 PM

Answers

  • The script that the GPO calls installs the SCCM client from the “Client” folder on the SCCM site server. For example, \\my-site-server.mydomain.com\Client\ .The reasoning for this approach is because the payload in the “Client” folder is automatically updated with you roll out major releases such as SCCM 2012 R2 (Not Update Rollups). Since the content is automatically updated, you will know you clients are always receiving the appropriate version of the client. You will need to setup appropriate permissions on that folder\share so the payload can be read and executed. For example, I gave the “everyone” group “read & execute”, “list folder contents”, and “read” permissions.

    Here is the script:

    'InstallSCCM-PS1.vbs

    'Installs ConfigMan Client assigned to 'PS1'

    '******************************************************************************

      Option Explicit

    '******************************************************************************

    ' Const

      Const GUID1 = "{D6804B3A-BFEC-4AB4-BFA5-FD9BECC80630}"

      Const INST_CMD = "\\my-site-server.my.domain.com\Client\Ccmsetup.exe /mp:my-site-server.my.domain.com SMSSITECODE=PS1"

    '******************************************************************************

    ' Global

      Dim oShell : Set oShell = CreateObject("WScript.Shell")

      Dim oEnv : Set oEnv = oShell.Environment("Process")

    '******************************************************************************

    ' MAIN

      If HasCMClient(GUID1) = False Then

        Tee "CM Client Not Found, running Installer."

        InstallClient INST_CMD

      Else

        Tee "CM Client Found, nothing to do."

      End If

     

    '******************************************************************************

    '* SUBS/FUNCTIONS

    '******************************************************************************

    '******************************************************************************

      Sub DoLogEvent(message)

        On Error Resume Next

        oShell.LogEvent 0, WScript.ScriptName & vbCrLf & message

      End Sub

    '******************************************************************************

      Sub Tee(message)

        On Error Resume Next

        DoLogEvent message

                    'WScript.Echo message 'enable when debugging

      End Sub

     

    '******************************************************************************

      Sub InstallClient(cmdLine)

        On Error Resume Next

        Err.Clear

        Tee "Running: " & cmdLine

        oShell.Exec cmdLine

        If Err.Number <> 0 Then

          Tee "Error Running Installer: [" & cmdLine & "]" & CHR(10) & Err.Description & "]"

        Else

          Tee "Started CCMSetup: """ & cmdLine & """" & CHR(10)

        End If

      End Sub

    '******************************************************************************

      Function HasCMClient(CMCode)

        HasCMClient = False

        On Error Resume Next

        Err.Clear

        Dim oWI, prod

        Set oWI = CreateObject("WindowsInstaller.Installer")

        Dim pCode

        For Each pCode In oWI.Products

          If pCode = CMCode Then

            HasCMClient = True

            Exit For

          End If

        Next

        If Err.Number <> 0 Then

          Tee "Error using Windows Installer object: " & Err.Description

          WScript.Exit 0

        End If

      End Function

    '******************************************************************************

    Let me know if you have more questions about the process, script, or the GPO.

    Here is how I am using discovery in my environment:

    Active Directory Forest Discovery - Enabled (Single forest, Multiple domains) Set to search every 1 day.

    Active Directory Group Discovery - Enabled, w/ delta discovery set to 5 minute intervals. No options set. Full polling – 7 day interval.

    Active Directory System Discovery - Enabled, w/ delta discovery set to 5 minute intervals. No options set. Full polling – 1 day interval.

    Active Directory User Discovery - Enabled, w/ delta discovery set to 5 minute intervals. Full polling – 1 day interval.

    Heartbeat Discovery - Enabled, sending heartbeat every 1 day.  IMO, every two hours seems excessive. Per Jason Sandys:

    Heartbeat Discovery messages are quite small and have negligible overhead on the client. Cumulatively, a large number could impact an under-powered management point, however, so setting them too frequently is not advisable. Out of the box, the default is 7 days. I typically set this down to every 1 day and know others do it even more often. I would never recommend setting this to less than 1 or 2 hours except in very small environments – there isn’t really any value in doing so anyway as nothing in the above list normally changes that frequently.

    Network Discovery – Disabled; we do not have a need for it in our environment.

    Let me know if you have additional or more specific questions.  I’ll try to help out as best as I can.
    • Proposed as answer by Daniel JiSun Wednesday, January 7, 2015 5:54 AM
    • Marked as answer by Daniel JiSun Monday, January 12, 2015 8:27 AM
    Monday, January 5, 2015 8:25 PM

All replies

  • Jon

    I think several different things are at play here. What first comes to my mind is you discovery methods. Once a computer is joined to active directory, it can then be found by "Active Directory System Discovery".  A polling schedule with a delta discovery of 5 minutes should locate any newly joined computers on 5 minute intervals. What do your discovery methods look like?

    The best way to install the client manually depends our you environment. My environment is built around "service provider" perspective. We have many departments that manage desktops differently, and use different imaging solutions.  We choose to use a GPO that triggers an immediate task which runs a script to install the SCCM client.

    Your inventories are based from settings in your client polices, but you can also manually trigger inventories.

    • https://social.technet.microsoft.com/Forums/systemcenter/en-US/89b7a106-dc5d-4768-9072-5b944ad35ff3/how-do-i-force-a-full-hardware-inventory-with-sccm?forum=configmgrinventory
    • https://gallery.technet.microsoft.com/SCCM-Configmgr-2012-How-to-229c84f6

    Hope this helps to get you started. Let us know if you have additional questions.


    Friday, December 19, 2014 5:36 PM
  • #2: will happen automatically, but it will take some time
    #3: give it some time after the client was installed before disconnecting it from the network

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

    Friday, December 19, 2014 6:07 PM
  • 3 - I would check log files after the client install is done. About 10~ get created right off the bat, and then more will get created as communication with MP happens. Personally when I'm installing the client and I see those extra log files get created I feel pretty confident that the client is healthy, though checking some to be sure there aren't any errors would probably give you a better idea that it actually is healthy though. 
    Friday, December 19, 2014 8:24 PM
  • Tony:

    would you be willing to share the script / methods you use to push the SCCM client installer through GPO?  I would really appreciate it.  I'm going to research this now, thank you for pointing me in the right direction.  I just want to make sure I'm deploying it the most effective way.

    As for discovery methods, we have the following set (any suggestions/comments on these are greatly appreciated...we're open to changing if these aren't best)

    Active Directory Forest Discovery - Enabled (we're a single forest, single domain) enabled.  Set to search every 4 weeks (we will not be expanding)

    Active Directory Group Discovery - Enabled, w/ delta discovery set to 5 minute intervals and only computers that have logged on to domain in past 90 days. (we're a school district, longest period any of our computers should go idle is 85~ days over the summer.)

    Active Directory System Discovery - Enabled, w/ delta discovery set to 5 minute intervals and only computers that have logged on to domain in past 90 days.

    Active Directory User Discovery - Enabled, delta / 90 days as well

    Heartbeat Discovery - Enabled, sending hearbeat every 2 hours.  (thoughts?)

    Network Discovery - Disabled (thoughts, this ok?)

    I appreciate any input whatsoever any of you can give, as well as resources that may help out.  I've learned a lot from you all, but have so much more to go ha :)

    Thanks again

    Monday, January 5, 2015 6:55 PM
  • Torsten : These laptops are coming in with little to no to full battery power, so it's a bit hit or miss how much juice we'll have.  We're doing these in mass groups, so having them online very long is not optimal.  I may be being way to picky and trying to go outside of SCCM's boundaries/capabilities, of which i completely understand if there's no way to do what i'm looking for.  It'd just make things a lot easier if we could force the client install, jump-start any reporting / communication required to complete the client installation, and shut down so we could put the fully healthy client/laptop in its cart for the teacher's / students to use.  

    Any pointers/recommendations?  or should we just plan to power up 200+ (and 700-100 more coming down the pipe in a few months) and leave them online for a while? 

    I appreciate you! Thanks!

    Monday, January 5, 2015 6:58 PM
  • The script that the GPO calls installs the SCCM client from the “Client” folder on the SCCM site server. For example, \\my-site-server.mydomain.com\Client\ .The reasoning for this approach is because the payload in the “Client” folder is automatically updated with you roll out major releases such as SCCM 2012 R2 (Not Update Rollups). Since the content is automatically updated, you will know you clients are always receiving the appropriate version of the client. You will need to setup appropriate permissions on that folder\share so the payload can be read and executed. For example, I gave the “everyone” group “read & execute”, “list folder contents”, and “read” permissions.

    Here is the script:

    'InstallSCCM-PS1.vbs

    'Installs ConfigMan Client assigned to 'PS1'

    '******************************************************************************

      Option Explicit

    '******************************************************************************

    ' Const

      Const GUID1 = "{D6804B3A-BFEC-4AB4-BFA5-FD9BECC80630}"

      Const INST_CMD = "\\my-site-server.my.domain.com\Client\Ccmsetup.exe /mp:my-site-server.my.domain.com SMSSITECODE=PS1"

    '******************************************************************************

    ' Global

      Dim oShell : Set oShell = CreateObject("WScript.Shell")

      Dim oEnv : Set oEnv = oShell.Environment("Process")

    '******************************************************************************

    ' MAIN

      If HasCMClient(GUID1) = False Then

        Tee "CM Client Not Found, running Installer."

        InstallClient INST_CMD

      Else

        Tee "CM Client Found, nothing to do."

      End If

     

    '******************************************************************************

    '* SUBS/FUNCTIONS

    '******************************************************************************

    '******************************************************************************

      Sub DoLogEvent(message)

        On Error Resume Next

        oShell.LogEvent 0, WScript.ScriptName & vbCrLf & message

      End Sub

    '******************************************************************************

      Sub Tee(message)

        On Error Resume Next

        DoLogEvent message

                    'WScript.Echo message 'enable when debugging

      End Sub

     

    '******************************************************************************

      Sub InstallClient(cmdLine)

        On Error Resume Next

        Err.Clear

        Tee "Running: " & cmdLine

        oShell.Exec cmdLine

        If Err.Number <> 0 Then

          Tee "Error Running Installer: [" & cmdLine & "]" & CHR(10) & Err.Description & "]"

        Else

          Tee "Started CCMSetup: """ & cmdLine & """" & CHR(10)

        End If

      End Sub

    '******************************************************************************

      Function HasCMClient(CMCode)

        HasCMClient = False

        On Error Resume Next

        Err.Clear

        Dim oWI, prod

        Set oWI = CreateObject("WindowsInstaller.Installer")

        Dim pCode

        For Each pCode In oWI.Products

          If pCode = CMCode Then

            HasCMClient = True

            Exit For

          End If

        Next

        If Err.Number <> 0 Then

          Tee "Error using Windows Installer object: " & Err.Description

          WScript.Exit 0

        End If

      End Function

    '******************************************************************************

    Let me know if you have more questions about the process, script, or the GPO.

    Here is how I am using discovery in my environment:

    Active Directory Forest Discovery - Enabled (Single forest, Multiple domains) Set to search every 1 day.

    Active Directory Group Discovery - Enabled, w/ delta discovery set to 5 minute intervals. No options set. Full polling – 7 day interval.

    Active Directory System Discovery - Enabled, w/ delta discovery set to 5 minute intervals. No options set. Full polling – 1 day interval.

    Active Directory User Discovery - Enabled, w/ delta discovery set to 5 minute intervals. Full polling – 1 day interval.

    Heartbeat Discovery - Enabled, sending heartbeat every 1 day.  IMO, every two hours seems excessive. Per Jason Sandys:

    Heartbeat Discovery messages are quite small and have negligible overhead on the client. Cumulatively, a large number could impact an under-powered management point, however, so setting them too frequently is not advisable. Out of the box, the default is 7 days. I typically set this down to every 1 day and know others do it even more often. I would never recommend setting this to less than 1 or 2 hours except in very small environments – there isn’t really any value in doing so anyway as nothing in the above list normally changes that frequently.

    Network Discovery – Disabled; we do not have a need for it in our environment.

    Let me know if you have additional or more specific questions.  I’ll try to help out as best as I can.
    • Proposed as answer by Daniel JiSun Wednesday, January 7, 2015 5:54 AM
    • Marked as answer by Daniel JiSun Monday, January 12, 2015 8:27 AM
    Monday, January 5, 2015 8:25 PM