Lync Hydration Setup Instructions
Public Release LyncLab.org Online Hydration
This script installs a complete environment from start to finish with DC, DNS, DHCP, CA, SQL Server 2012, Exchange Server 2013 & Lync Server 2013 all on Windows Server 2012 during the course of 2-5 hours depending on the hardware and timers that it is set in the StartLyncLabOnline.ps1 script.
We choose to release this script collection publicly so that we can crowd develop it and kind of make it open source. So if you use it and made some enhancements to it, PLEASE PLEASE PLEASE send us a note ( ) with the enhancements/changes you made so that we can make it better for everyone to use, that’s the only thing we want in return from you using it, so in other words, please give us feedback. Plus it would be nice if we got credit where credit is deserved AND we also have A LOT of credit to give to the people helping with this, else than that, use it in you labs, demos, trials, and proof of concepts now have some fun learning Lync Server 2013.
The script is used in our Mastering Lync Training Classes that we teach and if you would like to really learn Lync, sign up at
The prerequisites is simple, basically you just run the script in an elevated PowerShell prompt on a Windows Server 2012 that have the Hyper-V role installed and that’s it, but there a few more things to do first so please read through this document, also the links to the scripts are found in this document.
Contents
Lab 1 A. Prerequisites
Lab 1 B. Setup the Server 2012 Hyper-V host
Lab 1 C. Download and copy the *.iso files to C:\LyncLabOnline\ISOs
Lab 1 D. Configuring the variables.
Lab 1 E – Running the script and installing the environment
Support, Bugs, Ideas & Missed out credits
Credits.
One Last Thing. Where Do I Download The Script?
.DISCLAIMER
By running this script you agree that it is all done under your responsibility and the creators cannot guarantee that it will work. Or that you won’t screw something up in your existing environment.
Neither can we guarantee that your existing environment won’t break.
In other words, it’s all up to you from here!
Please look through the configuration scripts before running it in a live environment.
Lab1 A.Prerequisites
Before running the StartLyncLabOnline.ps1 you need to make sure that you fulfill the prerequisites. The requirements are simple and we need the following on the Windows Server 2012 Hyper-V host:
- Hardware requirements
- RAM
- Minimum of 16 GB RAM
- Recommended memory is 32 GB Ram or more if you have
- Disc setup and free space
- The Windows Server 2012 Reference disc requires 42 GB (this is referred to as the master disc in the PowerShell scripts)
- Child VMs ~200 GB
- It is recommended to separate the master from the child VMs to maximum disc performance, this can be done by specifying the drive letter where you want to install them in a variable when you run the script.
- It is recommended to run the VMs on SSDs or a raid that is configured for high throughput
- Processor
- Multiple processors with multiple cores are recommended
- As many as possible
- Windows Server 2012
- Hyper-V role configured
- PowerShell V3
Lab 1 B. Setup the Server 2012 Hyper-V host
Please start with a clean and fresh installed Windows Server 2012 Hyper-V host to make sure that everything installs correctly.
In this version of the script we still have some of the paths hardcoded in the script, this means that it needs to be run from the location specified in the script and it will in turn start some other scripts that also need to be found in this folder.
On the Windows Server 2012 that you will be running the LyncLab on, create the following folders on the C: drive
- C:\LyncLabOnline\
- C:\LyncLabOnline\PSWork\
- C:\LyncLabOnline\ISOs
There are also some more subfolders that will be created when you run the script if they don’t already exist, these are:
- C:\LyncLabOnline\Files
- C:\LyncLabOnline\Files\LyncTools
- C:\LyncLabOnline\Files\ExchangeTools
Now that you have created the base folders, copy the PowerShell scripts from that you downloaded and put them in the C:\LyncLabOnline\PSWork\
(The url to the script is at the bottom of this document)
This folder should now look like this.
Lab 1 C. Download and copy the *.iso files to C:\LyncLabOnline\ISOs
Now that the PowerShell scripts are in place it’s time to download the iso files that we will use to build our lab. Personally I download them from TechNet or MSDN as a subscriber, but trial versions or full versions should work just as good, but please note that the filenames in the script is based on the names on technet at the time when I downloaded them. These might have changed and you might have to update the StartLyncLabOnline.ps1 script with the new names of your files.
The iso files we need and the names in the script are:
- SQL Server 2012
"C:\LyncLabOnline\ISOs\en_sql_server_2012_enterprise_edition_x86_x64_dvd_813294.iso" - Lync Server 2013
"C:\LyncLabOnline\ISOs\en_lync_server_2013_x64_dvd_1043673.iso" - Exchange Server 2013
"C:\LyncLabOnline\ISOs\mu_exchange_server_2013_x64_dvd_1112105.iso" - Office Web Apps Server 2013
"C:\LyncLabOnline\ISOs\en_office_web_apps_2013_x64_dvd_1123682.iso" - Windows Server 2012
"C:\LyncLabOnline\ISOs\en_windows_server_2012_x64_dvd_915478.iso"
So if your iso file names differs from our, you need to change the name in the script.
Lab 1 D. Configuring the variables.
There are some variables that you can configure, like password, the drive you want to store your child VMs on and the default keyboard language on the VMs. Throughout all the scripts there are loads of parameters but I have tried to collect the most useful once in the StartLyncLabOnline.ps1 script so that we change them in there ONLY and they are then passed through to the other scripts when they are to be runned.
These parameters are listed in the start of the StartLyncLabOnline.ps1 script and they are listed here for your convenience:
Param
(
[parameter(mandatory=$False,HelpMessage="Provide the full path to where the Reference Disk should be stored (e.g C:\LyncLabOnline\VHDs\Master2012.vhdx).")][ValidateNotNullOrEmpty()]$VMRefDisk="C:\LyncLabOnline\VHDs\Master2012.vhdx",
[parameter(mandatory=$False,HelpMessage="Provide the secondary domain name (e.g contoso.com).")][ValidateNotNullOrEmpty()]$Domain2="contoso.com",
[parameter(mandatory=$False,HelpMessage="Provide the password (Default is Passw0rd).")][ValidateNotNullOrEmpty()]$pwd="Passw0rd",
[parameter(mandatory=$False,HelpMessage="Select a disc where you want the VMs stored (For C just type C for D type D).")][ValidateNotNullOrEmpty()]$InstallToDisk="C",
[parameter(mandatory=$False,HelpMessage="Select a default keyboard layout (Eg, sv-SE, nb-NO or all three en-US; sv-SE; nb-NO - The first value that is listed is used as the default keyboard.).")][ValidateNotNullOrEmpty()]$InputLocale="en-US"
)
# Please verify that the iso files listed here are downloaded and that the files downloaded and the filenames listed here match.
$ISOs="c:\LyncLabOnline\ISOs"
$SQL2012iso="C:\LyncLabOnline\ISOs\en_sql_server_2012_enterprise_edition_x86_x64_dvd_813294.iso"
$Lync2013iso="C:\LyncLabOnline\ISOs\en_lync_server_2013_x64_dvd_1043673.iso"
$Exchange2013iso="C:\LyncLabOnline\ISOs\mu_exchange_server_2013_x64_dvd_1112105.iso"
$WAC2013iso="C:\LyncLabOnline\ISOs\en_office_web_apps_2013_x64_dvd_1123682.iso"
$WinSrv2012iso="C:\LyncLabOnline\ISOs\en_windows_server_2012_x64_dvd_915478.iso"
# These parameters are kind of hardcoded in the script and it’s not safe to change them in this version! So please stick to them for now!
$PSWork="C:\LyncLabOnline\PSWork\"
$LyncTools="C:\LyncLabOnline\Files\LyncTools"
$ExchangeTools="C:\LyncLabOnline\Files\ExchangeTools"
$Files="C:\LyncLabOnline\Files"
$VMNetwork="LyncLab-Internal"
$VHDPath=$InstallToDisk+":\LyncLabOnline\VHDs"
$VMBaseLocation=$VHDPath
Lab 1 E – Running the script and installing the environment
Now that we have everything in place you can run the script.
Make sure to run it from the Server 2012 Hyper-v machine and in an elevated prompt.
Move the mouse to the corner of the screen and hit the Start Screen, type PowerShell and right click on Powershell, select Run as Administrator.
We have prepared some examples of how to run the script here:
.EXAMPLE 1 - Sweden
Example of how to use this cmdlet
$location = "C:\LyncLabOnline\PSWork\"
.\StartLyncLabOnline.ps1 -InstallToDisk D -InputLocale sv-SE -pwd P@ssw0rd
This will install the master to the default path C:\LyncLabOnline\VHDs\Master2012.vhdx and then the child VMs to the D drive, and then set the language on all servers to swedish.
.EXAMPLE 2 – Norway
Example of how to use this cmdlet
$location = "C:\LyncLabOnline\PSWork\"
.\StartLyncLabOnline.ps1 -InstallToDisk C -InputLocale nb-NO -pwd Passw0rd
This will install the master to the default path C:\LyncLabOnline\VHDs\Master2012.vhdx and then the child VMs to the C drive, and then set the language on all servers to Norwegian.
Support, Bugs, Ideas & Missed out credits
For support, bugs, errors or if you have an idea that you would like to see in the script or did you modify it and made it better or for anything else regarding the script or the labs, please send me an email at nd I will fix it and share it again.
Credits.
A year or two ago I did not know any PowerShell at all, and during this year that it took to develop, build and test this script I learnt a lot. From a lot of people.
So credits to a lot of people, and also a note to the people that blogs and posts PowerShell scripts online, this is for you, as a thank you for letting me learn from you and to borrow your code to put in this script collection. There is a lot small ps one-liners in the scripts that I borrowed from people and I would like to give you all a big THANKS!
One Last Thing. Where Do I Download The Script?
Now when you have read through this document please go to and you will find it there.
1 | Page