RES Automation Manager Building Block – Create and configure Active Directory domains

The RES Automation Manager Active Directory Building Block consists of two modules. The first module will configure the server in a new domain in a new forest where the second module will add a server to a already existing domain. Remember to first install prerequisites like DNS before executing these jobs.

To automatically configure Active Directory we need to call an answer file while executing dcpromo.exe. This answer file is just a text file which I like to create dynamically so I can use this modules in a multi tenancy environment. To do this we just run some Powershell echo’s to a text file based on global variables and parameters.

Continue reading

Powershell Microsoft Active Directory full script

image To finish the Powershell Microsoft Active Directory blog post series here is a script which I used for a customer. The script is used for moving the Terminal Server Home Drives of all TS users to a Central Directory. The central directory is based on the ServernameShare%USERNAME% value. The TS Home Drive location was set manually and different location were used. We needed to change this to one single location. Doing this manually would take us months so we need to automate these tasks.

Continue reading

Powershell and Active Directory Part 4/4 Set TS info

image Here we are with already the latest part in the Powershell and Active Directory blog series. In part 3/4 we worked with getting information from AD Object attributes which are not defined in the schema. In this part we will work on modifying the settings on these attributes.

Continue reading

Powershell and Active Directory Part 3/4 Get TS info

64px-Windows_PowerShell_icon Back again with a new post in the Powershell and Active Directory series of posts. Remember when I said I will show you how to work with attributes that are not schema attributes? By default you can do a $var.schemaatrributename like $ or $user.DistinguishedName. This is not possible for for example the TerminalServiceHomeDrive attribute because this strange enough is not a schema attribute.

Continue reading

Powershell and Active Directory Part 2/4 Search

64px-Windows_PowerShell_iconAfter part 1 of the Powershell and Active Directory postings we are now finally ready for working with Powershell and Active Directory! In this post I will show you how to do a basic Active Directory search. I know this has been explained over and over again on different blogs but I will go the extra mile which we need for part 3 which will be released later this week.

Continue reading

Powershell Active Directory Part 1/4 Intro



PowerShell Active Directory64px-Windows_PowerShell_icon

PowerShell Active Directory

Let me start by giving my honest opinion about Powershell. Powershell Rocks! This truly is a great and powerful scripting language. I’ve looked in to VB scripting before but really I don’t have enough patience to do VB! So keep in mind that I love powershell when reading the rest of this post.

Continue reading