Create Orchestrator Log Database

This is my contribution on how you can create an Orchestrator database to store information when running the Runbook.

CreateOrchestratorLogDB2

 This is how a Runbook could look like when adding log to the database.

 CreateOrchestratorLogDB1

Every “Write to Log” is adding information into the database with an INSERT clause. I use three different status messages depending on what is happening in the Runbook. The three different status messages I am using is: Success, Failed and Done.

This database is also perfect for reporting on how many Runbooks have been ran during a certain period.

Creating the database file: CreateOrchestratorDB

0

Get text from file in Linux system and add it to the Orchestrator databus

This Runbook copies everything inside a file on a Linux system and puts it on the databus. The text can then later be used in the Runbook and for example be copied to a text file.

In the example below the text in a Linux system text file will be copied to a text file.

Details on the Run SSH activity in Orchestrator.

Get text from file in Linux System 1

Details on the Append Line activity in Orchestrator.

Get text from file in Linux System 2

Execution Result is appended in the Text field at the Append Line activity.

Get text from file in Linux System 3

 

0

Alternative solution to add Locale on User Configuration Item in Service Manager 2012

The solution is provided “AS-IS” with no warranties and may not be supported by Microsoft.

This is an alternative solution to add Locale on User Configuration Items (CI) in System Center Service Manager 2012 (SCSM). It will use a System Center Orchestrator Runbook to add the locale for the user SCSM CI.

The Runbook needs two kinds of input. One is the SamAccountName and the other one is the locale. This typical Runbook only sets sv-SE, if provided as an input, or en-US for all other kind of locale input. The Runbook can easily be modified to set other locale by extending the Runbook.

setlocale

To be able to use this Runbook you need to have the Service Manager Integration Pack installed in Orchestrator.

Please feel free to download the Runbook and try it out yourself!

Runbook download: SetLocale

1

Remove Client Push records in Configuration Manager 2012

The solution is provided “AS-IS” with no warranties and may not be supported by Microsoft.

This solution stops Client Push in Configuration Manager 2012.

Start off by reading this at TechNet “What’s New in Configuration Manager for Windows-Based Computers”.

“Client push installation starts and tracks the installation of the client by using the Configuration Manager database and no longer creates individual .CCR files. When you enable client push installation for a site, all discovered resources that are assigned to the site and that do not have a client installed are immediately added to the database, and client installation begins.” http://technet.microsoft.com/en-us/library/gg682132#BKMK_DeployClientComputers

 Another thing that is good to know is that the SCCM server will stop to push to clients after 7 days if it cannot contact the client computers on the network. But before that it will try to push to them every hour until it succeeds. http://technet.microsoft.com/en-us/library/2ad4b21a-43bd-434e-b3bb-fc8744da7e9c#BKMK_upgrade

Removing Client Push in Database

It is never supported to make changes directly to the database so this solution is only for test purposes.

Looking at the table ”ClientPushMachine_G” in the ConfigMgr database you can see the records of the client push.

pic5 

What happens if we delete them or the one that returns error with client push? I have tried this in my lab environment and it seems to stop the client push to the clients.

If you want to try this yourself do this

  1. Generate client push records by using the application “Generate CCR” that you can find in the folder Adminconsle\Bin\ClientPushGenerator.exe on the ConfigMgr server. Generate clients that do not exist on the network. This will cause the push to return error.

Create a txt-file with the computernames under each other. Ex:

Client01

Client02

Client03

 Load this file into the application.

pic6

 2.      Look in the database table ”ClientPushMachine_G” to see if the clients have been registered.

 pic7

You can also look in the view “v_CP_Machine” to see the clients.

 3.      Delete the rows with the clients you don’t want to push to anymore and look in the ccm.log to see if the push to this clients ends.

DELETE FROM ClientPushMachine_G WHERE Name like ‘Client01’;

0