SharePoint 2013: Unattended Installation Gotchas
An unattended installation is an automated installation of any kind of Microsoft product that you can use to install or upgrade. It can be an operating system or a software application with minimal or NO user intervention. Unattended installations are typically used during large-scale rollouts when it would be too slow and costly to have administrators or technicians interactively install the operating system on individual computers.
As we are now migrating all our SharePoint 2010 Servers to SharePoint 2013 and installing every server separately could be very dangerous like have different installations (settings that you forget to adapt, 3th party tools that you forget to install, a firewall exception etc…) and will cost many dollars to the company. A full automated unattended script will never forget these and will always do the same on all servers.
For more information about the unattended installation please refer to:http://technet.microsoft.com/en-us/library/cc785644(v=ws.10).aspx
Unattended installations for SharePoint Server?
Yes, it’s absolutely possible. A good friend of mine from the @Wikininjas (Wiki Ninjas is a group of authors who celebrate and evangelize the community catalyst and social-authoring excellence that is called TechNet Wiki.) wrote an excellent script that you can download on theGallery of Microsoft. The PowerShell scripts provided by Craig will automate the download and installation of the SharePoint 2013 Prerequisites on Windows Server 2012 etc… The scripts will assist those who need to install SharePoint 2013 ‘offline’ or wish to manually install its Prerequisites on Windows Server 2012.
Not only Craig from the @Wikininjas provided such scripts but ALL the SharePoint Community created several scripts in different ways to download and install in a few clicks SharePoint 2013 and configure it.
The real question here is “are they all FULL unattended?” Can I with only “1 click” download, install and configure my SharePoint Farm?
Before the gotchas a few great examples:
- http://sharepointengineer.com/2012/11/18/sharepoint-2013-create-and-configure-the-sharepoint-2013-farm-using-powershell/
- http://blogs.msdn.com/b/uksharepoint/archive/2013/03/18/scripted-installation-of-sharepoint-2013-and-office-web-apps-server-from-the-field-part-2.aspx
- http://sharepoint-tutorial.net/post/2012/07/19/scripted-installation-sharepoint-2013.aspx
Full Unattended installations for SharePoint Server?
Several scripts on the internet are not full unattended; they just are “scripts”. The scripts are working great but if you want to create your own script due to the company’s own corporate best practices like “1 click only” you can have several issues.
Questions that you can ask are; Are these scripts able to bypass any TMG, PROXY or a FIREWALL rule to download the prerequisites? What if the UAC isn’t deactivated on the server?
Now you can say that as a SharePoint Administrator or Developer you can’t think to everything but you’re task is to create a NO user intervention needed script. And there are many ways to achieve that goal.
Here are a few gotchas about a full unattended scripting for a SharePoint download, install and configuration.
-NoNewWindow
When you have to install several executables or MSI’s please be sure to use the –NoNewWindow in the Start-Process commend line with PowerShell. With this parameter you’ll ensure that no any new window will appear during the installation. This option will start the new process in the current console window. By default Windows PowerShell opens a new window.
-Language Packs needs configuration file
Language Packs are very important in SharePoint. Especially in Belgium. As there are 3 official languages; every person wants to see his SharePoint site in his language (French, Dutch or German). When you try to install a specific language pack on SharePoint 2010; a simple command line was enough as they were simple executables.
Start-Process -filepath “$SourcePathLANG\ServerLanguagePack_NL.exe” -Argument “/quiet” -PassThru –Wait
With the /quit argument you’re actually specifying that the installation should be “invisible” for the user. The QuietArg attribute is also appended if the Setup is running. In such cases, you can specify the QuietArg attribute with the “/quiet” switch. For example, you can use: QuietArg=”/quiet”.
When you try to install SharePoint 2013 language pack as on his old way, you get an error message saying that the /quiet argument isn’t supported anymore. You have to specify one of the following arguments to install the language pack.
- /Config
- /Modify
- /Repair
- /Unistall
http://gokanx.files.wordpress.com/2014/04/1.png?w=600&h=300
As you can see for installing the Language Pack you need a Configuration File. According to TechNet you can create your own configuration file: http://technet.microsoft.com/en-us/library/cc261668(v=office.14).aspx (Still valid for SharePoint 2013)
Just copy a configuration file and add the following arguments
<Configuration>
…
<Setting Id=”SETUPTYPE” Value=”CLEAN_INSTALL”/>
** <Display Level=”Basic” CompletionNotice=”No” AcceptEULA=”Yes” />**
…
</Configuration>
With the following arguments you’re saying that you accept the EULA and that there won’t be any information (message box) about your installation.
-Use CALL
You should use call when you need to call another batch program (cmd script). Using ‘call’ will have no effect on any other executable file.
You should consider creating 1 batch file with all your scripts herein. This will become your central point for all your scripts. The CALL command is extremely important if you’ll have a sequential installation and will ensure that every script gets executed even if in a script you’ll have an “EXIT”.
http://gokanx.files.wordpress.com/2014/04/un.jpg?w=600
-Slipstream
Before the release of Microsoft SharePoint Server 2013 Service Pack 1 (SP1), Microsoft did not support the installation of SharePoint Server 2013 in a Windows Server 2012 R2-based environment. However, with the release of SharePoint Server 2013 SP1, this configuration is supported in Windows Server 2012 R2.
There are still few issues with the Service Pack 1 (SP1) of SharePoint but still, the main idea is the same. Please use a slipstreamed version that you can download from the Microsoft Developer Network (MSDN), the Volume Licensing Service Center (VLSC), and the Microsoft Partner Network (MPN). You should avoid creating your own slipstream versions because of a change in the package layout that was introduced with the March 2013 product update.
SharePoint 2013 “with” SP1 is the supported installation scenario on Server 2012 R2. SharePoint 2013 RTM and upgrade to SP1, or self-slipstreaming SP1 is not supported for an installation Server 2012 R2.
-Local Intranet and files that came from another computer
Not all servers in companies have access to the “internet”. Security wise we can’t better but this isn’t the best User Experience ever. If you didn’t download and copied the sources (Prerequisites and install files) locally, bah, you could have a serious problem.
If you’ll have several server with no internet access please download the necessary files and place them somewhere. This somewhere can be somewhere local or a shared folder.
- If you’re using a Shared Folder please be sure to add the \Share\Folder to Local Intranet otherwise you’ll receive a pop up during the installation that the sources are on an unsafe location.
- If you downloaded the executables please also be sure that you unblock these.
http://gokanx.files.wordpress.com/2014/04/una.png?w=600
-Start-Sleep
We noticed that even if the script finishes his job that SQL Server was still busy with the configuration of his components. I’m not pretty sure if it’s a best practice but I’ll recommend you to use the –Start-Sleep cmdlet.
The Start-Sleep cmdlet (which is probably more useful in scripts than it is as a command-line command) enables you to pause Windows PowerShell activity for a specified period of time. For example, this command pauses Windows PowerShell for 600 seconds:
Start-Sleep -s 600
This kind of cmdlets will prevent you from unnecessary errors as creating your SharePoint Farm even when SQL Server did not finish his job etc…
-/unattended
http://gokanx.files.wordpress.com/2014/04/una123.png?w=600
This is the code that you’ll see in many scripts. When defining your prerequisites in a variable please be sure that you add the /unattended argument. This will ensure that all the software’s are installed in a NO user intervention way.
$param=‘/unattended‘ + `
‘/SQLNCli:”C:\temp\SP2013-prereq\sqlncli.msi” ‘ + `
‘/IDFX:”C:\temp\SP2013-prereq\Windows6.1-KB974405-x64.msu” ‘ + `
‘/IDFX11:”C:\temp\SP2013-prereq\MicrosoftIdentityExtensions-64.msi” ‘ + `
‘/AppFabric:”C:\temp\SP2013-prereq\WindowsServerAppFabricSetup_x64.exe” ‘ + `
‘/KB2671763:”C:\temp\SP2013-prereq\AppFabric1.1-RTM-KB2671763-x64-ENU.exe” ‘ + `
‘/MSIPCClient:”C:\temp\SP2013-prereq\setup_msipc_x64.msi” ‘ + `
‘/WCFDataServices:”C:\temp\SP2013-prereq\WcfDataServices.exe” ‘ + `
‘/Sync:”C:\temp\SP2013-prereq\Synchronization.msi”‘
Start-Process -filepath $SourcePRE -Argument $param -PassThru -Wait –NoNewWindow
Conclusion
As you can see there are many ways to improve an unattended script. I just wanted to share real problems I had during the scripting of my fully automated unattended script!
Enjoy