Automated Active Directory Deployment with PowerShell

Powershell

For a small presentation at KTSI I created a PowerShell script will automatically will deploys Active Directory Servers, adds other member servers, creates Organization Units and adds users via Powershell Remoting. As source there is a XML configuration file and CSV files for User Data.

Install AD with Powershell

This script is just for Lab deployments not for production, and it is not perfect, but I think maybe some people will enhance this script with their own code.

I do not support this script. it is just something I need to deploy my test environments and nothing more. More it shows diffrent

You can find more information about it works in this document.

XML Config file:


<?xml version="1.0" encoding="utf-8"?>
<lab>
<config>
<servers>
<server name="ADS01" ip="192.168.100.11" id="1" adminpw="passw0rd"/>
<server name="ADS02" ip="192.168.100.12" id="2" adminpw="passw0rd"/>
</servers>
<ad>
<domain name="ktsi.local" netbiosname="ktsi" forestlevel="4" domainlevel="4" safemodepw="passw0rd" />
</ad>
<ous>
<ou name="UserAccounts" path="DC=KTSI,DC=LOCAL" />
<ou name="BASEL" path="OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="CHICAGO" path="OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="NEWYORK" path="OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="SALES" path="OU=BASEL,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="IT" path="OU=BASEL,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="ADMINISTRATION" path="OU=BASEL,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="PRODUCTION" path="OU=BASEL,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="SALES" path="OU=CHICAGO,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="IT" path="OU=CHICAGO,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="ADMINISTRATION" path="OU=CHICAGO,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="PRODUCTION" path="OU=CHICAGO,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="SALES" path="OU=NEWYORK,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="IT" path="OU=NEWYORK,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="ADMINISTRATION" path="OU=NEWYORK,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="PRODUCTION" path="OU=NEWYORK,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
</ous>
<users>
<file name="users.csv" path="OU=ADMINISTRATION,OU=BASEL,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
</users>
<members>
<member name="PC101" ip="192.168.100.21" />
<member name="PC101" ip="192.168.100.22" />
<member name="PC101" ip="192.168.100.23" />
</members>
</config>
</lab>

The PowerShell Script:

Continue reading

Building a new Hyper-V Private Cloud Lab

Two years ago I created my first real IT Lab with some HP ProLiant ML110 G5. I used this in the past years to test new products and projects. The Lab at this time was very limited, no storage, no cluster, not much RAM and weak CPU performance. Not much help if you work a lot with Hyper-V Clusters and System Center products.

I was looking around for some time now to find a cheap offer for new servers. In the last week I found a offer from Cisco with c200 M2 servers and I couldn’t resist to buy two of the for my Hyper-V Cluster nodes. The offer was a special deal which was even cheaper than building the servers by my own, at this point thanks to my former employer Atlantis Informatik AG.

Now what I will do is creating a new Hyper-V Cluster friendly environment with two Cisco C200 M2 Hyper-V nodes, one HP ML110 G5 as Storage Server and one of my old HP ML110 G5 servers as Hyper-V Server which all my Management servers and Active Directory will run on.

Lab Overview

If you want to know more about Hardware you can use for a Hyper-V Lab I recommend the posts of Carsten Rachfahl on hyper-v-server.de (german).

Hardware Configuration

Hyper-V nodes:

cisco c200 m2

2x Cisco C200 M2 - Intel Xeon 5620 2.4GHz Quad Core, 16GB RAM, Remote Management, IPMI, 6 Networkports

Storage Server:

ml110g5

1x HP ProLiant ML110 G5 – Intel Xeon E3110 3.0 GHz Dual Core, 8GB RAM, 4x 500GB Raid 10, 3 Networkports

Management Hyper-V node:

ml110g5

1x HP ProLiant ML110 G5 – Intel Xeon E3110 3.0 GHz Dual Core, 8GB RAM

DirectAccess for SMB and Lab environments – Design, Step by Step and Troubleshooting Guide

DirectAccess for SMB and Lab Environments This is a modified document which I wrote for a Microsoft Workshop at KTSI. It’s a Desgin, Step by Step and a Troubleshooting Guide for Microsoft DirectAccess. This is made for SMB or LAB environments not for Enterprise Deployments.

I hope this guide can help you deploy DirectAccess in your environment and you can enjoy DirectAccess like I do ;-)

Continue reading