In our last post, we used the PDT’s VMCreator.ps1 script to create all the VMs that are required to setup all System Center components.
Now, we are going to use the Installer.ps1 script to finish the installation.
Start by running PowerShell command prompt as Administrator. Right-click on PowerShell and choose ‘Run As Administrator’.
In the PowerShell command prompt, change the working directory to where the Installer.ps1 script is located (in my example, in the Downloads folder); for example: cd “C:\Users\Adin\Downloads”.
Before running the script to execute the installation, it is best to run the validation option first, to ensure everything is in place. To do this, run the Installer.ps1 script with the “-ValidateOnly” parameter, like this: PS C:\Users\Administrator\Downloads\PDT2.5.2509> .\Installer.ps1 -ValidateOnly. This will initiate the validation, which checks things like the VMs, dependencies, SQL Server installations, and media for installation.
As you can see in my lab example, the Media validation has failed.
You will notice that the Installer.ps1 script is looking for the media in the C:\Temp directory. But wait, didn’t we download all of the required files by running the Donwloader.ps1 script? Yes we did. Then why is this validation failing?
Simply, the Downloader.ps1 script downloaded all the required files, but rather than placing them into the C:\Temp directory, it put them in C:\Installer\Prerequisites. If you look at the Variable.xml file, specifically lines #7 and 8, you will see the following:
<Variable Name=”SourcePath” Value=”$SystemDrive\Temp” />
<Variable Name=”Download” Value=”C:\Installer” />
These lines tell the scripts where path to the source files are, and where (originally) to download those files.
So at this point, we have 2 choices. Either we can move all of the files into C:\Temp, or we can change the “SourcePath” directory to match where the files are downloaded to (namely C:\Installer\Prerequisites).
In my case, I’ll just move the files. But if you want, you could modify the SourcePath variable.
Re-run the Installer.ps1 script with the “-ValidateOnly” parameter. The validation for the Media should pass now. However, as you can see in my lab example, I am now getting validation failures on the Service Accounts.
So, how do we fix this? Well, first, I should mention that I am running the PowerShell scripts on my HOST machine; which is NOT a part of the domain. This is why the validation of the Service Accounts fails.
So you have 2 choices, either join your HOST to the domain, or copy the Installer.ps1 script and C:\Installer directory to the Domain Controller. Since I like to re-build my lab over and over, I don’t prefer to add my HOST to the domain. So, in my lab example I opted to copy the files to my Domain Controller VM, and re-run the Installer.ps1 script with the “-ValidateOnly” parameter.
Now, when I did this, I am STILL getting validation errors, but this time with the Server and Access validation.
Why is this? Honestly, I don’t know. But I do recall reading/hearing somewhere about possibly having to run these scripts from an Administrator’s workstation, and NOT from any of the systems that the scripts are designed to work with. Since I was originally running the scripts on my HOST system that was NOT connected to the domain, that was one issue. Then I ran the scripts from the Domain Controller, which resolved the Account validation.
So, I thought that I would try one last thing. I decided to create an Administrator workstation and run the scripts from there. Now, of course I ran the Installer.ps1 script with the “-ValidateOnly” parameter just to see if everything passed prior to actually running the script to perform the installation. And guess what! Everything passed!
So, now that we know everything is green and we won’t end up with a partial/incomplete installation, we are now ready to run the Installer.ps1 script, and complete the final part of our installation.
Run the Installer.ps1 script, and the validation will be completed again (as designed), then the installation will be initiated.
Just like the VMMCreator.ps1 script, the display will turn green when each item is completed. Eventually, it will complete all pieces.
Congratulations, you have now successfully used the PowerShell Deployment Toolkit (PDT) to automatically install and configure an entire System Center environment!
One final note. You may not have noticed, but all of the System Center consoles were actually installed onto server RD01. Why is that? It’s not the Administrator’s workstation. The answer is because that server is the System Center Orchestrator Runbook Designer server, which requires all of the consoles for the interoperability/connectivity to create runbooks, and thus System Center automation.
So, if you are looking for the console for a specific System Center component (i.e. SCOM, SCCM, etc.), you will need to log into the RD01 server and launch it from there. Alternatively, since we had to setup an Administrator workstation, you could install each console on the workstation as well.
I hope this post series on the PowerShell Deployment Toolkit has been helpful. Happy lab-ing.