The Multifunctioning DBA:

AD


January 14, 2012  8:00 AM

PS script to check SQL Server Groups



Posted by: Colin Smith
AD, Groups, Powershell, SQL Server

This is the script that I threw together to check and see if a user is in multiple AD Groups that are logins to the SQL Server instance. This helped me resolve an issue and it may help you look for things like explicit deny or some other reason why a user does not have the access they need or...

October 22, 2010  10:00 AM

Create Random Password and update AD account



Posted by: Colin Smith
AD, Powershell

Not to long ago I was asked to write a script that would create a random password and change an AD account to use that new password. The requirements were that the password be 3 uppercase letters 2 numbers and 3 lowercase letters. Here is what I did.


May 26, 2010  7:00 AM

Powershell to get unique login count from SQL Server



Posted by: Colin Smith
AD, Administration, DBA, Powershell, Reporting

Just like I needed to get a count of unique logins to an application on one of our Sybase instances I also needed to get these values for a few of our SQL Servers. Since SQL Server uses mixed mode authentication and we are using AD groups to aid in the security of the SQL Server, I could not just...


April 13, 2010  5:00 PM

Powershell: AD Groups



Posted by: Colin Smith
AD, Groups, Powershell

Two weeks ago was part of implementing a large upgrade in one of our Sybase environments. In order for this upgrade to be succesful we had to do some work in some AD groups. We needed to find all the users that would need to be a member of the new group that we were creating and take them out of...


October 21, 2009  10:00 AM

AD Audit all together



Posted by: Colin Smith
AD, AD Administration, AD Managment, Powershell, Scripting

Here is the full script so you can copy and paste it. Remember that you will need to make some modifications to the script to fit your environment. Let me know if you have any questions at...


October 20, 2009  6:48 PM

AD Audit Script Q and A



Posted by: Colin Smith
AD, AD Administration, AD Managment, Powershell, Q and A, Scripting

I got the following comment on Part 3 of the script. RobDolfijn Hi Colin, This is just what I need so I’m looking forward to the whole script! I’m getting stuc on Get_Users because it...


October 20, 2009  4:45 PM

AD Audit in Powershell Script Part 6



Posted by: Colin Smith
AD, AD Administration, AD Managment, Powershell, Scripting

As i recall, in Part 5 we had gathered all the account information, parsed that, disabled accounts that needed to be disabled, gathered information on all the disabled accounts, and removed the accounts from the domain that needed to be...


September 27, 2009  9:00 AM

AD Audit in Powershell Script Part 5



Posted by: Colin Smith
AD, AD Administration, AD Managment, Powershell, Scripting

Now that we have disabled and moved all the disabled accounts to the Disabled OU I am going to get all the user object information from just the disabled OU this time. I need this since objects have been moved around. This scan of AD does go much faster as I am only scanning the one OU. I have this...


September 25, 2009  4:57 PM

AD Audit in Powershell Script Part 4



Posted by: Colin Smith
AD, AD Administration, AD Managment, Powershell, Scripting

Now that we have all of the users information into a csv file it is time to start sorting through all of that data and determining what objects need to be disabled and moved to the disabled OU that I have set up for all disabled accounts to go and await deletion. Lets do that with the...


September 24, 2009  8:30 PM

AD Audit in Powershell Script Part 3



Posted by: Colin Smith
AD, AD Administration, Powershell, Scripting

Now that we have the main part of the script setup it is time to look at the first function that we call. This is the Get_users function. Now this function gets a listing of all the DC's and does a get-qaduser on all of them looking at the lastlogon property to determine what DC has the latest...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: