attachments/lrayl/media/windows-live-writer/f8964d150782_82ec/clip_image001_thumb.png

Orchestrator System Center Integrations Part 2 – Creating a computer account in an OU

Orchestrator System Center Integrations Part 2 – Creating a computer account in an OU

 

In part 1 of this Orchestrator System Center Integrations blog, we setup the configuration for the Orchestrator Integration Packs for AD, Configuration Manager, Operation Manager and Virtual Machine Manager. Now, let’s create a simple Runbook to Create a computer account in a specific OU.

 

Incase you missed it, here is the link for Part 1

http://blogs.catapultsystems.com/lrayl/archive/2013/06/21/orchestrator-system-center-integrations-part-1-setting-up-the-integration-packs.aspx

 

 

All the way at the bottom of Activities you will see Runbook Control, clicking on Runbook Control, you will see Initialize Data. This is basically your input for the Runbook. You can input data into a Runbook from the Runbook Tester, the Web Interface, System Center Service Manager, an HTML page, SharePoint web part, or whatever. I just run the Runbook Tester; it’s a quick and easy what to test a Runbook. All you do is highlight Initialize Data and drag it into your workspace.

 

clip_image001

 

Now select the Active Directory Activities. Notice all the Activities you have for AD. We are only interest in the Create Computer account. But as you can see, there is a whole lot more you can do. Drag Create Computer into the workspace.

 

clip_image002

 

Now, hover over Initialize Data, until you see the crosshairs. Now, using your mouse, drag a line between Initialize Data and Create Computer.

 

clip_image003

 

Next, right click on Create Computer and select Properties. Click the ellipse and select the configuration you want to use. (what you setup earlier). Now all you see is Common Name. So what is the Common Name of your server? How does this tell me what OU? As you see, there are Optional Properties you can set.

 

clip_image004

 

So the way Orchestrator works is this thing they call the Databus. Information from the previous object is passed down to the next. So let’s add in some optional properties.

 

For the Create Computer activity to work properly, we need to add in some Optional Properties. Here we are going to add in Container Distinguished Name, Description, Display Name, DNS Host Name, Location and SAM Account Name. Simply click on the >> to add items from the right to the left. Then select OK.

 

clip_image005

 

Once finished, we end up with this

 

clip_image006

 

So a lot of this information is the same. But I don’t want to hardcode information in here, I want it to come from my input. So, what I have to do is subscribe to the information. To do that I right click in each line and select Subscribe, Published Data. Published Data would be anything passed down the Databus.

 

clip_image007

 

But when I select the drop down for Activity, there is nothing. Well that’s because we don’t have anything in the Published Data Activity.

 

clip_image008

 

So lets put some information in the Initialize Data Activity. So really Looking at the Properties for Published Data, what do i need to complete this out? Well, I need a Computer Name, I also need a Description of the Computer. I also need the location.

 

So lets add the properties into Initialize Data. Right Click on Initialize Data, and select Properties. As you can see, there is nothing in Initialize Data. Now click Add. Click on Parameter 1 and rename to Computer Name or Server Name and select OK.

 

clip_image009

 

Now, click on Add again. In rename Parameter 2 to Computer Description and select OK

 

clip_image010

 

Lets also add in Computer Location and select Finish.

 

clip_image011

 

Okay, now we have information in Initialize Data. Lets go back into the Create Computer Activity and Subscribe to the Published Data from Initialize Data. So for Common Name, what is that? Well it’s the Computer Name. Right Click on Common Name and select the Computer Name from the Initialize Data activity. Highlight Computer Name and select OK.

 

clip_image012

 

Do the same thing for Description, Subscribe to Computer Description from Initialize Data.

 

clip_image013

 

Display Name is the same as Computer Name. Subscribe to the Computer Name Activity from Initialize Data.

 

clip_image014

 

DNS host name is going to be the Computer Name again. For Location, we select the Computer Location Activity from Initialize Data, get the idea?

 

clip_image015

 

The Container Distinguished Name is going to be where you want the new Computer to be created. If you do not put anything in here, it will default to Computers in AD. I what all new computers or servers to go into my Servers OU in AD. So, I am going to hard code the Servers Distinguished Name for this one. I input OU=Servers,DC=LAB,DC=Local. That is the distinguished name for the Servers OU.

 

clip_image016

 

You can verify by opening up ADSI Edit and selecting the container where you want to create the computer and select Properties. You can even view and copy to the clipboard by selecting the View button in ADSI Edit.

 

clip_image017

 

Then finally the SAM account name is going to be the same as Computer Name. Lets select Computer Name from Initialize Data. Afterwards, select Finish.

 

clip_image018

 

OK, now lets see if it works. Select Runbook Tester from the menu items.

 

clip_image019

 

Then select Run or Step Through. Remember, we are actually running the Runbook. Tester means you are Testing to make sure it works. No simulations here.

 

clip_image020

 

So when I select Run, I need to put in the Computer Name, Computer Description, and Computer location. Go ahead and enter in the information.

 

clip_image021

 

When I click OK, an new computer account should be created in the Servers OU in AD.

 

I can see from the Log that everything was successful

 

clip_image022

 

Checking AD, we see that our new computer account was created.

 

clip_image023

So, we now know how to create a simple Runbook. In part 3, we will add on a little more and create a VM with this computer name.

One Response

  1. Anthony June 18, 2014

Leave a Reply