Agent Jobs

Prestage Cluster Configuration – Find The OU

Whenever you’re setting up a Failover Cluster Configuration in a post Server 2012 world… You’ll need to prestage the cluster objects in Active Directory. Microsoft offers some good documentation on the steps to carry out creating the Failover Cluster using the a checklist found here: https://technet.microsoft.com/en-us/library/dn505754(v=ws.11).aspx and also the actual prestaging process found here: https://technet.microsoft.com/en-us/library/dn466519(v=ws.11).aspx

Unfortunately; there aren’t a great deal of short cut tips on how to get some of the information you need. For example; finding the OU’s a Computer resides in. The good news is you can do this with a quick one-liner in powershell. Get-ADComputer.

Using a standard 2 Node Example for Failover Cluster implementation:

#THIS WORKS
get-adcomputer MyClusterName
get-adcomputer Server01
get-adcomputer Server02

#THIS ALSO WORKS
“MyClusterName”, “Server01”, “Server02” | get-adcomputer

Alternatively there is also a quick one-liner you can do in Command Prompt if you want to get the OU where the server resides and that’s the following

dsquery computer –samid MyServerName$

Notice the dollar sign $ at the end of the Server Name. This is required in the script. In the results you’ll see the OU’s where the Server resides.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s