Jump to content


  • 0
cmnd_ctrl

SCCM 2007 client install vbscript

Question

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

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

if that is the case,create a folder and copy the installation files into it and provide read access to everyone else go with startup script http://blogs.catapultsystems.com/jsandys/archive/2010/12/30/updated-configmgr-startup-script.aspx or client push installation method.

Share this post


Link to post
Share on other sites

  • 0

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?

Share this post


Link to post
Share on other sites

  • 0

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)...

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.