Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

PowerShell to search for domain Computer objects

By Fahim Ahmad,

When a Cluster is created in Windows, the process requires the creation of new computer objects in the Active Directiry (AD).  The easiest method to create the cluster is log in as an account that has elevated (admin OR create, alter, delete) rights on the OU for Computers.  There is an alternative however which would make Domain Admins much happier, especially if the DBA typically does not have rights to the AD.

The alternative to elevated permissions is to request that the admins pre-create the copmuter objects within the Active Directory.  This way when the Cluster setup or the subsequent SQL Server Cluster setups run, they see their computer objects already existing and waiting to be activated.

In a previous article [Search For: PowerShell to Pre-Create domain objects for SQL Server Cluster] I covered how a  Domain Admin could run a PowerShell script to create a new OU for the SQL Clusters (creating a new OU is an organizational choice, this is not required), and then create the pre-determined computer objects within that OU.  This step could also be done by hand without PowerShell, with the guarantee that the computer objects are created and then immediately "disabled" otherwise the cluster setups will NOT be able to see them as available.  It is also critical that the security on the new objects be set manually (I was unable to elegantly script a permissions change process), to allow the main cluster object full controll on subsequent computer objects created on the cluster.

But lets assume that all the Active Directory creation was handled already by someone else.  And before you begin your cluster setups, you want to verify that the objects you defined, requested, and rely on have already been created.

Here is the script to query Active Directory as a non-elevated member.  No special permissions are required.  The assumption is that the login used to fire the query is a member of the active directlry the cluster computer objects reside in.

Total article views: 716 | Views in the last 30 days: 2
 
Related Articles
SCRIPT

PowerShell to Pre-Create domain objects for SQL Server Cluster

Pre-Create Active Directory Virtual Computer objects to support a new SQL Cluster

ARTICLE

SQL Server 2012 Active/Active Cluster in Hyper-V

Learn how to create a SQL Server 2012 Active/Active cluster in Hyper-V using an iSCSI SAN

FORUM

SQL Server 2005 on active active cluster.

SQL Server 2005 on active active cluster.

FORUM

ACtive-ACtive Clustering SQL server 2005

ACtive-ACtive Clustering SQL server 2005

FORUM

ACtive-ACtive Clustering SQL server 2005

ACtive-ACtive Clustering SQL server 2005

Tags
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones