Showing posts with label SMS. Show all posts
Showing posts with label SMS. Show all posts

Wednesday, June 10, 2009

Failed to install SMS client The error code is 80041002

ccmsetup.log showed

Setup failed due to unexpected circumstances. The error code is 80041002

also in client.msi.log the following error was there as well

Product: Configuration Manager Client -- Installation operation failed.

seems there are lots of different causes and fixes. Here is the one that fixed this for me.

1. Stop the "Windows Management Instrumentation" service.
2. Rename the %WinDir%\System32\Wbem\Repository folder to ”Oldrepository”.
3. Restart the “Windows Management Instrumentation service”.
4. Verify that the %WinDir%\System32\Wbem\Repository folder has been recreated.
5. Reinstall the SMS client software.


**Update**

Seems I randomly would get different message's so I checked my rights on the shared folder that the client is in. I gave everyone read and execute and so far so good on the installs



Monday, June 1, 2009

Input Box To Change SMS Site Name By Computer Name

Here is a little script that I put together by combining a few other scripts. When ran an Input box will pop up and ask for the computer name. It will then return the current Site name, then the new name that you specify by editing the file. If the computer is not on nothing will be returned.


Option Explicit
On Error Resume Next
Dim WSHShell, WSHNetwork, Input, smsClient, inparam, Newresult, Newsite, oCCMNamespace, strComputer, result

Set WSHShell = CreateObject("WScript.Shell")
Set WSHNetwork = CreateObject("WScript.Network")

Input = InputBox("Enter the Computer name","SMS Site Code Fix")
strComputer = Input

'get the current site code
set oCCMNamespace = GetObject("winmgmts://" & strComputer & "/root/ccm")
Set smsClient = oCCMNamespace.Get("SMS_Client")
Set result = smsClient.ExecMethod_("GetAssignedSite")
wscript.echo strComputer & " Current Assigned Site is: " & result.sSiteCode

'Reassign the site code
Set inParam =smsClient.Methods_.Item("SetAssignedSite").inParameters.SpawnInstance_()
inParam.sSiteCode = "XYZ"
Set Newresult = smsClient.ExecMethod_("SetAssignedSite", inParam)
Set NewSite = smsClient.ExecMethod_("GetAssignedSite")
wscript.echo strComputer & " New Assigned Site is : " & NewSite.sSiteCode



Make sure to change the site code to your site code.
inParam.sSiteCode = "XYZ"

Logon Script to change SMS Site Code

Found this script and it seems to do the job. I've added it to the logon script in AD

sSiteCode = "XYZ"
sMachine = "."
set oCCMNamespace = GetObject("winmgmts://" & sMachine & "/root/ccm")
Set oInstance = oCCMNamespace.Get("SMS_Client")
set oParams = oInstance.Methods_("SetAssignedSite").inParameters.SpawnInstance_()
oParams.sSiteCode = sSiteCode
oCCMNamespace.ExecMethod "SMS_Client", "SetAssignedSite", oParams

change xyz to your sitecode

Monday, May 4, 2009

Assigning Advanced Clients from the Command Prompt

I've found this and it may useful to some people.

Assigning Advanced Clients from the Command Prompt
You can assign Advanced Clients to SMS sites by running a script at the command prompt. The Advanced Client has a scripting object (Microsoft.SMS.Client) that you can use to do this. This object is installed with the Advanced Client software. For more information, see the Microsoft Systems Management Server 2003 Software Development Kit.

The following example demonstrates several of the Advanced Client scripting methods.

Set smsclient = CreateObject("Microsoft.SMS.Client")
oldsite = smsclient.GetAssignedSite
wscript.echo oldsite
smsclient.EnableAutoAssignment(True)
'or:
smsclient.SetAssignedSite("NES")
Adjust the script as necessary for your specific requirements.

Wednesday, April 15, 2009

Installing IIS on server 2003 for SMS

Well found a good link for the correct way to install IIS for SMS on windows server 2003. Follow the link.

Installing IIS

Tuesday, April 14, 2009

MMC cannot open the file drive:\SMS\bin\i386\sms.msc

Have you ever tried to run your SMS console and the following error appears?

MMC cannot open the file (drive):\SMS\bin\i386\sms.msc
This may be because the file does not exist, is not an MMC console, or was created by a later version of MMC. This may also be because you do not have sufficient rights to the file.

Happened to me twice so far and the fix is pretty simple. You must browse to C:\Documents and Settings\(username)\Application Data\Microsoft\MMC\SMS and rename the sms file in that folder. I usually do a _old to keep just incase. After the rename just run the console again and it will recreate the file..

Thats it. From a little research it seems to happen when remoted to the SMS server and having the server lock / lose connecting while the console is still running.