Install Without a Product Key in the Configuration File

For security purposes, you might not want to store the product key within the configuration file. Instead, you can use the -PIDKey parameter, followed by your product key in quotes on the command line with the Install-SharePoint cmdlet, as in Listing 3.4.

Listing 3.4. Installing SharePoint from the Command Line with a Product Key

Install-SharePoint -setupexepath D:\setup.exe -configxmlpathc:\config.xml -PIDKey "ABDCE-FGHIJ-KLMNO-PQRST-UVWXY"

Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.