Thursday, September 30, 2010

CWmi::Connect(): ConnectServer(Namespace) failed. - 0x80041001 error

When you try to manually push SCCM client installation, in ccm.log on SCCM Server, you get the following error:

  • CWmi::Connect(): ConnectServer(Namespace) failed. - 0x8004100e SMS_CLIENT_CONFIG_MANAGER 9/30/2010 12:19:17 PM 4496 (0x1190)
  • Unable to connect to WMI (r) on remote machine "computer name", error = 0x8004100e. SMS_CLIENT_CONFIG_MANAGER 9/30/2010 12:19:17 PM 4496 (0x1190)

To resolve this issues you must delete or rename the machines WMI Repository and allow it to recreate itself.

Follow the steps below to accomplish this on local machine:

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. Push again SCCM client software.

Monday, September 20, 2010

Assign computer name using Task Sequence Variable

The computer name can be assigned or changed during OS Task Sequence deployment.

OSDComputerName Task Sequence variable can be used for that purpose.

This variable has to be applied before "Apply Windows Settings".

Tuesday, September 14, 2010

Remotely rename computer name

This VBS script can be used to remotely rename computer name.
It is using netdom command and it is successfully tested on Windows Server 2008 R2 to rename Windows 7 machine.

Copy this text below into vbs script, modify the value for your "DOMAIN" and put your user with Domain Admin privileges;

'On Error Resume Next

'open the file system object
Set oFSO = CreateObject("Scripting.FileSystemObject")
set WSHShell = wscript.createObject("")

Dim sNewCname 'Variable to hold Computer Name you enter in the inputbox
Dim sOldCname 'computers current name

'First param is message text, second is message title
sOldCname = InputBox("Enter computers current name","Windows Netdom Rename Script")
sNewCname = InputBox("Enter computers new name","Windows Netdom Rename Script")

Call WSHShell.Run("cmd.exe /K netdom renamecomputer " & sOldCname & " /newname:" & sNewCname & " /userd:DOMAIN\ADMINISTRATOR /passwordd:* /usero:DOMAIN\ADMINISTRATOR /passwordo:* /force ")

WScript.Echo "Click OK for reboot target machine"
set objWMI = GetObject("winmgmts:\\" & sOldCname & "\root\cimv2")
for each objOS in objWMI.InstancesOf("Win32_OperatingSystem")

Script is asking for old and new computer name, after that you should enter password for the user with Domain Admin privileges twice and click OK this machine to be rebooted remotely.

Friday, September 10, 2010

SCCM 2007 R2 Report: Patch compliance progression report

Copy the contents below and paste in SQL Based Report in SCCM 2007 R2 console:



when (sum(case when UCS.status=2 then 1 else 0 end))>0 then ('Needs '+(cast(sum(case when UCS.status=2 then 1 else 0 end)as varchar(10))+ ' Patches'))
else 'Good Client'
end as 'Status',
ws.lasthwscan as 'Last HW scan',
v_UpdateComplianceStatus UCS
left outer join dbo.v_GS_COMPUTER_SYSTEM CS on CS.ResourceID = UCS.ResourceID
join v_CICategories_All catall2 on catall2.CI_ID=UCS.CI_ID

join v_CategoryInfo catinfo2 on catall2.CategoryInstance_UniqueID = catinfo2.CategoryInstance_UniqueID and catinfo2.CategoryTypeName='UpdateClassification'

left join v_gs_workstation_status ws on ws.resourceid=CS.resourceid
left join v_fullcollectionmembership FCM on FCM.resourceid=CS.resourceid
UCS.Status = '2'
and FCM.collectionid = 'SMS00001'
Group by
Order by

Wednesday, September 8, 2010

Modify SendEmailToUserAlias Value in RSReportServer.config

By default user with "Browser" privileges cannot change the value in To field. This value is automatically populated with user name alias.

User with "Browser" privileges can modify the content of this field, if the value SendEmailToUserAlias from True is changed to False.


This value is located in RSReportServer.config file in the following folder: C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer

Friday, September 3, 2010

How to create SCCM-SRS Subscriptions for SSCM 2007

When you try to create own SCCM Subscription you get the following message:
"Subscriptions cannot be created because the credentials used to run the
report are not stored, or if a linked report, the link is no longer valid."

In order to allow users to create own SCCM Subscriptions it is necessary to configure these settings on SCCM Console:

For user name, SCCM user service account with Domain Admin privilege can be used.