• Om

René Kierstein's Blog

~ There is no home without windows

René Kierstein's Blog

Monthly Archives: February 2013

ConfigMgr Provider reported an error, when accesing item in SCCM console

22 Friday Feb 2013

Posted by renekierstein in Database, SCCM

≈ Leave a comment

Tags

console, provider error, SMSAdminUI.log, Unable to load site control file

This error here is quite tricky to solve, but I finally succeded with help from MicroSoft.

The error occur when you e.g. try to access the sender in the SCCM console from Central site at a primary child site.

The SmsAdminUI.log reports following error:

Description = “Unable to load site control file. “;
ErrorCode = 2160198400;
File = “c:\\qfe\\nts_sms_fre\\sms\\siteserver\\sdk_provider\\smsprov\\sspsitecontrolextractor.cpp”;
Line = 109;
ObjectInfo = “xxx”;
Operation = “ExecQuery”;
ParameterInfo = “SELECT * FROM SMS_SCI_Component WHERE SiteCode=’xxx’ AND FileType=2 AND ComponentName=’SMS_X25_RAS_SENDER'”;
ProviderName = “WinMgmt”;
StatusCode = 2147749889;

What to do, to solve this.

When I first discovered the error and began troubleshooting. I startet with a preinst.exe /synchchild from Central site and  a preinst.exe /synchparrent from the primary child site to update the site control file – this did not help.

Next was to resinstall the sms provider – no luck still the same error.

Then I did a site reset after advise from Microsoft, still the same error.

The solution was to detach the Primary site from the hierarchy.

1. Delete the primary child site address from the central site

2. Delete the Central site address from the primary child site

3. Change the configuration at primary child to be “Central site” so it no longer report to the original central site.

4. WAIT till the “locks” are gone from the primary child site

5. Normally this will give the result that the primary child site is removed from the site hierarchy. BUT this was not the case for me.

6. So Next step was to dive into the database and run the “Delete FROM …” you see below (replace nnn with you sitecode og the primary child site)

This made the trouble site to dissapear from the Console..

Time to attach the sites again.

7. Recreate the addresses at both central and primary child site

8. Change primary child site to report to central site again

9. Make a new secure key exchange between the 2 sites. (preinst.exe /keyforchild and /keyforparent)

10. The primary child site turns up again at the console at central site and the problem with “”Unable to load site control file” is gone.

11. After a short while the objects at the primary child site are getting “locked” again.

12. Monitor Replmgr.log, Sender.log and despooler.log to see how central site are busy getting things back in order a

*****

The DELETE FROM statements below is delivered by MS as a part of the trobleshooting, uses it at you own risk!

My advise is to open a support case at MS before you decide to alter the database!

DELETE FROM SysResList WHERE SiteCode=‘nnn’

DELETE FROM SiteBoundaryADSite WHERE SiteCode=‘nnn’

DELETE FROM SiteBoundaryIPSubnet WHERE SiteCode=‘nnn’

DELETE FROM SiteControl WHERE SiteCode=‘nnn’

DELETE FROM SiteControlNotification WHERE SiteCode=‘nnn’

DELETE FROM Sites WHERE SiteCode=‘nnn’

DELETE FROM Sites_DATA WHERESiteCode=‘nnn’

DELETE FROM SiteWork WHERE SiteCode=‘nnn’

DELETE  FROM PkgServers WHERE sitecode=‘nnn’

DELETE  FROM PkgStatus WHERE sitecode=‘nnn’

Log file in Powershell

18 Monday Feb 2013

Posted by renekierstein in Powershell

≈ Leave a comment

Tags

logfile, logging, Powershell

Here is a way to get prette nice logging with Powershell. I’m still working on it, and there will come an update later…

The “Logwrite” function takes 3 parameters. The first one is the $ts, it print the date into the logfile.

The second is a string you can use to make the logfile more readable, and finally the third parameter prints a vaiable value into the logfile.

Output example:

2013.02.18-16.11.30 package information
2013.02.18-16.11.30 PackageName: Adobe Adobe Reader 9.3 ALL_ENUS_R1
2013.02.18-16.11.30 Accepted exitcode: 2;3010
2013.02.18-16.11.30 Install is startet
2013.02.18-16.11.30 script/file executed AdobeReader.vbs
2013.02.18-16.11.30 Install has ended

 

 

Script example:

$LogFile=“C:\temp\PSWRAP.txt”

[xml]$Xmlfile=Get-Content “<path to XML file>\test.xml”

Packageinfo

Install

Function LogWrite([string]$line=“*”,$val) {

$ts=Get-Date–formatyyyy.MM.dd–HH.mm.ss 

Add-Content$logFile“$ts $line $val”

}

Function Packageinfo {

Logwrite “package information”

$packagename =$xmlfile.Package.Name

Logwrite “PackageName:”$packagename

$Exitcodes =$Xmlfile.Package.Install.AllowedReturncodes

Logwrite “Accepted exitcode:”$Exitcodes

}

 

Function Install {

LogWrite “Install is startet”

$Do = $XmlFile.Package.Install.file

Logwrite “script/file executed: “$Do

LogWrite  “Install has ended”

}

Recent Posts

  • With SCCM CB 1612 technical preview comes the RESTful OData API
  • Agent fail to download policies
  • Configmgr – list applications in tasksequence
  • Configmgr unattended install – SetupWpf.exe. return value 1
  • Ccmsetup.log – configmgr2012ac-sp2r2sp1-kb3100144-x64.msp installation failed

Archives

  • March 2017
  • February 2017
  • September 2016
  • July 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • January 2015
  • October 2014
  • April 2014
  • February 2013
  • September 2012
  • August 2012

Categories

  • bootimage
  • certificate
  • Collections
  • Configmgr
  • Database
  • Ikke kategoriseret
  • policies
  • Powershell
  • pxeboot
  • Reporting
  • REST API
  • SCCM
  • SCCM 2007
  • SCCM CB
  • Server 2012
  • SUP
  • UEFI
  • winpe
  • wsus

Twitter Updates

  • RT @djammmer: While today is Black Friday, it also is quite likely a #configmgr Friday. The 13th production release of current branch may… 1 week ago
  • Kom frisk.... lnkd.in/d7_UHT4 1 week ago
  • @SetupConfigMgr thnx a lot. 3 weeks ago
  • #PatchMyPC Software installed at non-standard path, will this be updated with PatchMyPC? 3 weeks ago
  • Had to rebuild my lab and saw this minor typo...#MEMCM #SCCM https://t.co/ofcuFS8sme 4 weeks ago
Follow @Renekierstein

Create a free website or blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy