Create Service Applications, Web Applications, and Site Collections for a development single server SharePoint 2016 farm.
- SharePoint Server 2016 is installed, and Central Administration website is accessible.
- No other databases are present except the SP Admin Content database & the SP Config database.
- SharePoint Server is allowed to "communicate" with the database server (firewall rule)
- Logged into the SharePoint Server 2016 with the "SPInstall" account
- Application Pool account is already created (if not added in SharePoint as a managed account, the script will try to add it for you.)
What will the script create?
The following Service Applications (SA) will be created:
- Business Data Connectivity
- Managed Metadata
- State Service
- Usage & Health Data Collection
- User Profile (UPSA)
- Search (all components on one server)
- App Management
- Word Automation
- Machine Translation
Each Service Application can be commented out in the script if not needed (e.g.: Word Automation).
The following Web Applications will be created:
The following Site Collections will be created:
- Portal (Team Site template under the Portal Web Application)
- Sites (Team Site template under the Sites Web Application)
- Enterprise Search (Enterprise Search Center template under the Search Web Application)
Run the script
- The script should be run on the SharePoint 2016 Server.
- The script can be run from the SharePoint Management Shell, or from the regular PowerShell console (Get-PSSnapin will be checked).
-DBServerNameparameter uses <Server\Instance> or can be SQLAlias
Running the script:
.\DevSPFarm_2016 -DBServerName <Server\Instance> -LocalDomain "<myDomain.com>" -AppPoolAcct <SPAppPool_Acct> -SPInstallAcct <SPInstall_Acct>
.\DevSPFarm_2016 -DBServerName DCSQL\SP01 -LocalDomain "contoso.com" -AppPoolAcct SPAppPool -SPInstallAcct SPInstall
.\DevSPFarm_2016 -DBServerName DCSQL02 -LocalDomain "contoso.net" -AppPoolAcct spapppool -SPInstallAcct spinstall
The following artifacts are integrated in the script:
- Check if the
Microsoft.SharePoint.PowerShellsnapin is present
- Check if the Application Pool account is registered in SharePoint as managed account
- Will log a transcript (using
- Progress bar at the top to know what's happening
- Will display at the end, how long the script took to run
Please have a look at the Screenshots folder.
SCRIPT IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, AND IS MEANT FOR DEVELOPMENT / TESTING PURPOSES.