

$SecureString = ConvertTo-SecureString $Password -AsPlainText -Force Now that you have the VM created and it has been renamed and has a static IP address, you can go ahead and install and configure Active Directory Domain Services.

Get-WindowsFeature | Where installed >$featureLogPath New-Item $featureLogPath -ItemType file -Force Set-DnsClientServerAddress -InterfaceIndex $ipif -ServerAddresses ($ipdns, $ipdns2) New-NetIPAddress -IPAddress $ipaddress -PrefixLength $ipprefix -InterfaceIndex $ipif -DefaultGateway $ipgw

That is, you need to rename the virtual machine, set a static IP address and DNS information, and install the Remote Server Administration tools. Now that you have a virtual machine up, you need to do a few things prior to installing Active Directory.

#Configure Virtual Machine to Boot from DVD $DVDDrive = Get-VMDvdDrive -VMName $VMName Set-VMMemory $VMName -DynamicMemoryEnabled $falseĪdd-VMDvdDrive -VMName $VMName -ControllerNumber 0 -ControllerLocation 1 -Path $InstallMedia New-VM -Name $VMName -MemoryStartupBytes 16GB -BootDevice VHD -Path $Path -NewVHDPath $VHDPath -NewVHDSizeBytes $VHDSize -Generation 2 -Switch $Switch Open up the PowerShell ISE as Administrator. The first thing that you need to do, in order to get our hybrid identity environment up and running is to create a virtual machine that will be used as our on-premises Active Directory server. They are relevant for all of the tutorials.Ĭopies of the PowerShell scripts that are used in this tutorial are available on GitHub here. The scripts used create a general Active Directory environment prior to installing the Azure AD Connect cloud provisioning agent. You can and should change the variables to reflect your environment. Each of the scripts uses variables that are declared at the beginning of the scripts. This tutorial uses PowerShell scripts so that you can create the tutorial environment in the quickest amount of time.
