IT Consultant Everyday Notes

Just some problems/solutions storage

Monthly Archives: September 2013

SCSM: Database installation fails

Issue: SCSM Management Server fails on “Install Database” step with the following error:

An error occurred while executing a custom action:_CreateDatabase This upgrade attempt has failed before permanent modifications were made. Upgrade has successfully rolled back to the original state of the system. Once the correction are made, you can retry upgrade for this role.


Resolution: I am using Hyper-V VMs with dymnamic disks. Microsoft mentioned in the setup documentation that dynamic disks are not recommended by performance reasons, but I did not see direct statement I cannot use them Smile

Anyway – as soon as I changed Dynamic disk I used for database location to a Fixed disk the issue disappeared.

SCCM: What CCMSETUP does and difference between /mp and SMSMP

Found a nice article by Jason at


“Options” like /mp that are prefixed with a forward-slash are parameters for CCMSETUP itself. Thus, they control or affect the behavior of CCMSETUP and not the client agent. So, even though /mp contains the letters ‘m’ and ‘p’, this does not in any way mean that it sets the MP for the client agent. What /mp actually does is instruct CCMSETUP which MP to use to query for a DP (as mentioned above) thus bypassing the normal MP lookup.

Multiple MPs can be specified using /mp by separating them with a comma (this enables the lookup to try each MP in order if availability of the MPs is a concern):

ccmsetup.exe /mp:mp1.mydomain.local,mp2,mydomain.local

Additionally, if an MP requires HTTPS communication, you should specify the prefix in URL format including the protocol:

ccmsetup.exe /mp:https://securemp.mydomain.local

It is always a good practice to use the full FQDN and ensure that name resolution is working for this name on the target clients. If name resolution is not working, you’ve got bigger problems that CCMSETUP cannot magically solve. Note also that CCMSETUP setup parameters require a colon between the option name and the value specified for that option.


“Options” like SMSMP that are in all capital letters are public properties that are not processed or used in any way by CCMSETUP but are instead passed directly to client.msi when CCMSETUP executes it. Thus, these properties do directly affect the client agent and its configuration. Note that you don’t actually have to specify the properties in all capital letters on the command-line, but it is best to do this so that they clearly stand-out.

SMSMP specifies the initial MP that the client agent uses (“initial” because with 2012, we can have multiple MPs within a single primary site and this will rotate periodically on clients). Without SMSMP, the client agent relies on normal MP location processes (AD, DNS, WINS) just like CCMSETUP does to initially set the MP that the client agent will use.

As with /mp, you should use the full FQDN of the MP and if an MP uses HTTPS, you should also specify the name of the MP in URL format including the prefixed protocol:

ccmsetup.exe SMSMP=https://mp.mydomain.local

ccmsetup.exe SMSMP=https://securemp.mydomain.local

Unlike /mp, you can only specify a single MP with SMSMP. Also, public properties are not prefixed with a forward-slash and use an equals sign to set the value of the property.

One thing to make sure of is that you specify all CCMSETUP parameters on the command-line before you specify any public properties. This simply has to do with how CCMSETUP parses the command-line: it assumes that all parameters come first so as soon as it encounters a property, it stops looking for anymore parameters.

You can of course use both these options together which is common because the reason for using them is the same: you don’t want to (or can’t) rely on normal MP lookup. If MP lookup is working, then there’s no reason to use either. The only time to really expect any issues with MP lookup is when the target client is untrusted like when it’s in a workgroup. Remember that during a Build and Capture task sequence, the target/reference system should not be joined to a domain so specifying SMSMP in the Setup Windows and ConfigMgr task should be done – no need to specify /mp though because the source files needed by CCMSETUP are part of the client agent install package and thus already resident locally.

Although I haven’t tested explicitly and so I’m not sure of the exact ramifications, if a client is destined to be within a secondary site’s scope, you should still specify the MP for the primary site for both of these options instead of the MP at the secondary site. Remember, that clients always need to be able to communicate the MP in their primary site even if they are within the scope of a secondary.

SCCM 2012: Cannot start reports from Admin console

Problem: I cannot start reports from admin console (neither starting it a normal user nor “As Administrator”. I can access reports via Web interface though.


Event viewer (Application log):

Event ID: 1

Level: Error

Source: critical

System.IO.FileNotFoundException\r\nCould not load file or assembly ‘Microsoft.ReportViewer.WinForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.\r\n   at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.ReportViewerWindowsForms..ctor()
   at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.LaunchReportFormViewControl.InitializeComponent()
   at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.LaunchReportFormViewControl..ctor()
   at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.LaunchReportDialog.InitializeReportControl()
   at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.LaunchReportDialog..ctor(Tag tag)
   at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.Actions.ShowReport(IReport report, IReportServer reportServer, IResultObject resultObject)
   at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.Actions.LaunchReport(Object formView, ScopeNode scopeNode, ActionDescription actionDescription, IResultObject resultObject, PropertyDataUpdated propertyDataUpdated, Status status)\r\n


Resolution:  I installed a Report Viewer 2010 and reports are available now.

Install SCCM on a Workgroup machine(s) using PSEXEC

Sysinternals (now Microsoft) offers a tool for remote management called PSEXEC. It is a part of Microsoft PSTools and can be downloaded from here:

One of my Clients recently needed to install SCCM client on a number of Workgroup machines.

The tool can be used for that. I slightly modified scripts I found here and here is the result:

I am using my ConfigMgr where I logged on as SCCMADMIN for this purposes.

1. Be sure you can resolve your Workgroup Machine name either via DNS or WINS or (in my case, good for test – just a hosts file)


2. Be sure you have an account with Local Administrator permissions on the Workgroup Machine. Ideally you may have an account with the same name as your domain account (in my case SCCMADMIN) and the same password. In this case you do not need to provide it in PSEXEC options.


3. Firewall should allow File and Print Sharing and Windows Remote Administration on the Workgroup machine (we are going to connect to it remotely!)


4. Now we are ready for some scripting. We will need three files:

      a. SCCM_Clients.txt  – a list of Workgroup computers we are going install SCCM Client to

      b. Start.bat  command file – to read the list and initiate execution

rem =======================

for /F %%a IN (sccm_clients.txt) DO call data.bat %%a

rem =======================

       c. Finally data.bat execution file itself. There is some logic in the script – it checks if CCMSETUP folder is already on the machine to avoid multiple install. I added DNSSUFFIX parameter to ccmsetup command line and hardcoded SCCM MP location (since workgroup machine cannot get from AD). DNSSETUP should be enough to get it from DNS, but if the workgroup machine won’t go to AD DNS for some reasons it won’t find it. So I hardcoded it to be on safe side.

rem ===========================
IF NOT EXIST “\\%1\c$\” GOTO noaccess
IF EXIST “\\%1\c$\” GOTO found

Echo %1 is off>>results.txt

Echo Found on %1>>results.txt
psexec \\%1 cmd /c “md c:\ccmtemp”
xcopy /Y /s \\<SCCCM_SERVER_NAME>\SMS_TOR\Client \\%1\c$\ccmtemp
psexec \\%1 -s c:\ccmtemp\ccmsetup.exe /service /mp  <Sccm_Server_Name> SMSSITECODE=TOR

Echo Not on %1>>results.txt

rem ===========================

Note: DNSSUFFIX switch must be on the same line as ccmsetup commund

5. I started a command line (As Administrator) navigated to a folder where I put my scripts (assuming PSEXEC is available from that command line) and started Start.bat (as you can see I have Echo ON for debugging purposes, so the output a bit chatty:


6. As soon as the Client is installed and contacted MP I can see it my SCCM console. I need to Approve it (since I have Automatic Approval for Domain Clients only)


7. Now client can be managed. I can deploy Apps and use remote connection Tool Smile




P.S. On MMS 2013 one of presenters mentioned it is not necessary to use Boundaries Group for site assignments. In my case I needed to add Site assignment; otherwise the client could not read policies. So probably it is still necessary:


Another note: SCCM Client Source files are copied to a local drive before installation; you may decide to create an SCCM program to remove the folder as soon as the machine is manageable