Skip to content

SCCM 2007 client install vbscript

Featured Replies

I need assistance as I have a large project that I'm working on. I'm stuck connecting to windows workstations manually under the local admin account, un-installing all 3rd party software including multiple versions of symantec antivirus, symantec endpoint protection, rebooting the workstations, changing the workstations names to the proper name, disabling windows firewall etc, and then I manually copy over the sccm client install files to the workstation and perform the manual install so I can bring the clients into sccm. Now I have performed this method by myself manually on 300+ workstations and it is very time consuming. I really need assistance on helping to speed up this process and I have found examples on how to create a vbscript to help install the ccm client on workstations. The problem with the vbscript is that the script fails every time as it cannot authenticate and connect to the sccm network share for the install. I need to somehow add the domain username and password to the script so I can connect to the sccm network share to install the ccm client on specific machines manually that I've logged onto under the local admin account for those workstations.

 

' SCCM 2007 Client Install

' Checks for installed SMS or SCCM service on the local machine

' If NO service exists install the SCCM 2007 client

'On Error Resume Next

Dim computerName, servicesArray, serviceString, objWMIService, wshShell, objFSO, smsFolder

' SCCM Installation Objects

set wshShell = WScript.CreateObject("WSCript.shell")

' SCCM Service Check Variables

computerName = "."

servicesArray = Array("SMS Agent Host", "SMS Client Service")

i = 0

Set objWMIService = GetObject("winmgmts:\\" & computerName & "\root\cimv2")

For Each service In servicesArray

If i > 0 Then

serviceString = serviceString & " or DisplayName = '" & service & "'"

Else

serviceString = "DisplayName = '" & service & "'"

End If

i = i + 1

Next

Set objWMIService = GetObject("winmgmts:\\" & computerName & "\root\cimv2")

If (objWMIService.ExecQuery("Select DisplayName, State from Win32_Service where " & serviceString).Count = 0) Then

wshShell.Run "\\SCCM01\SMS_CCC\Client\ccmsetup.exe /mp:sccm01.test.local smssitecode=ccc smsslp=sccm01.test.local", 0, True

End If

  • Author

Eswar thanks for the feedback. I dowloaded the configmgrstartup vbscript and configmgrstartup xml file and they seem large with script and code. Do I have to customize both files and then dump all scripts and install files in 1 folder? Is there a way I can get assistance in helping to customize this for my sccm site so I can begin to use?

I think you need to break things down into steps and questions. Your first post is asking for the entire ball of wax. So what is your first problem that you're running into that you want help with in your script and/or process? Your first goal should probably be to get the SCCM client installed. After that you can deploy apps and scripts to the machines and let them do all the work (so instead of one huge overwhelming scripted process you break it down to smaller ones and let SCCM help)...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.