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