Jump to content




anyweb

How can I install System Center Configuration Manager version 1702 (Current Branch) on Windows Server 2016 with SQL 2016



Recommended Posts

anyweb    399

Introduction

In a previous guide I showed you how to install System Center Configuration Manager version 1606 (Current Branch) on Windows Server 2016. This guide will show you how to quickly install the latest and greatest baseline version, System Center Configuration Manager version 1702 (Current Branch) on Windows Server 2016 using SQL Server 2016. The concept behind this long and detailed post is to guide you through all the steps necessary to get a working ConfigMgr Primary site installed using manual methods or automated using PowerShell.

This is not a hydration kit, there are many examples out there. Take a look at Johans excellent hydration kits for example. This, on the other hand gives you the power to automate the bits that you want to automate, and manually do other tasks if deemed appropriate.

PowerShell knowledge is desired and dare I say it required (if you are in any way serious about ConfigMgr).I will show you how to do most steps via two methods shown below, it's up to you to choose which method suits you best but I highly recommend using PowerShell.

  • Method #1 - Do it manually
  • Method #2 - Automate it with PowerShell

Assumptions

In this guide I assume you have already installed two workgroup joined servers running Windows Server 2016 (choose Windows Server 2016 Standard (Desktop Experience)) as listed below, and that you've configured the network settings. The network settings I am using for this lab are shown below.

Server name: AD01

Server function: Domain Controller

Server status: Workgroup joined

  • IPv4 Address: 192.168.7.1
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 192.168.7.199
  • DNS: 192.168.7.1

Server name: CM01

Server function: Configuration Manager Primary site

Server status: Workgroup joined

  • IPv4 Address: 192.168.7.2
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 192.168.7.199
  • DNS: 192.168.7.1

Server name: Smoothwall

Server function:Linux firewall

Server status: 2 legacy nics

eth0: 192.168.7.199

eth1: x.x.x.x (internet facing ip)

Scripts used in this guide

The scripts used in this guide are available at the bottom of the guide in the Downloads section, download them before beginning and extract them to C:\scripts on your destination server(s).

Step 1. Configure Active Directory Domain Services (ADDS)

Note: Perform the following on the AD01 server as Local Administrator.

To setup Active Directory Domain Services you could manually click your way through the appropriate wizard in Server Manager or automate it using PowerShell. For your benefit I'll show you both methods below, all you have to do is choose which one suits you.

Method #1 - Do it manually

1. To manually setup ADDS, in the start screen search for Server Manager. Click on Add roles and features

add roles and features.png

2. For Installation Type choose Role-based or Feature-based installation

role based or feature based.png

3. For Server Selection choose the local server (AD01)

local server.png

4. For Server Roles select Active Directory Domain Services and DNS Server, when prompted to install any packages accept the changes.

adds and dns.png

5. Continue the the wizard and click Install

install.png

6. Click Close to complete the wizard.

features done.png

7. After it's finished, perform the Post Deployment Configuration by clicking on Promote this server to a domain controller

promote this server to a domain controller.png

select the Add a new forest option, give it a root domain name such as windowsnoob.lab.local and click through the wizard, when prompted for a password use P@ssw0rd.

add new forest.png

and click your way through to completion.

 

Method #2 - Automate it with PowerShell

To configure ADDS and DNS automatically, use the ConfigureADDS.ps1 PowerShell script.

1. Copy the script to C:\scripts.

2. Edit the variables as desired before running.

3. Start Windows PowerShell ISE as Administrator and run the script by clicking on the green triangle.

configure ADDS.png

Step 2. Join CM01 to the domain

Note: Perform the following on the ConfigMgr server (CM01) as Local Administrator

 

Method #1 - Do it manually

To join the domain manually, bring up the computer system properties. Click on Change settings beside the computer name, click Change and enter the appropriate domain join details, reboot when done.

join domain.png

Method #2 - Automate it with PowerShell

To join the domain automatically, use the joindomain.ps1 PowerShell script.

1. Copy the script to C:\scripts.

2. Edit the variables as desired before running.

3. Start Windows PowerShell ISE as Administrator and run the script by clicking on the green triangle.

join domain with powershell.png

TIP: If DNS is not set correctly on the CM01 Network Properties, then Domain Join will fail, in addition the script currently doesn't check for sucess/failure and will reboot, I'll amend that in the next version.

Step 3. Create users
Note: Perform the following on the Active Directory Domain Controller server (AD01) as Local Administrator

Note: The PowerShell script creates users and makes a user a local admin on the CM01 server. To facilitate the local administrator creation, you'll need to create a GPO on AD01 called Allow Inbound File and Printer sharing exception which sets Windows Firewall: Allow inbound file and printer sharing exception to Enabled.

Method #1 - Do it manually

To create users manually, add the following users in AD using Active Directory Users and Computers:

  • <your user name>, a domain user, this user will become a local administrator on CM01
  • Testuser, a domain user
  • CM_BA, used for building ConfigMgr created images CM_JD, used for joining computers to the domain
  • CM_SR used for reporting services.
  • CM_CP, a domain user used when installing the Configuration Manager Client for Client Push.
  • CM_NAA, a domain user, (Network Access Account) used during OSD

active directory users and computers.png

 

Method #2 - Automate it with PowerShell

To create users automatically, use the Create Users Usergroups and OUs in AD.ps1 PowerShell script.

Tip: You should edit the script and adjust the variables to your liking, for example if you want to change the default password. You may also want to rem out the MDT and MBAM user/groups that are created and change some of the user names within the script. To rem out a line place a # in front of it.

Note: Pay attention to the remarks in lines 81-84 and configure the variables in lines 86-88 after configuring the GPO listed if you want your username to be a local admin on CM01.

1. Copy the script to C:\scripts.

2. Edit the variables [lines 68-80] as desired before running.

3. Start Windows PowerShell ISE as Administrator and run the script by clicking on the green triangle.

create users in ad.png

 

Step 4. Create the System Management Container
Note: Perform the following on the Active Directory Domain Controller server (AD01) as Local Administrator

For details of why you are doing this see https://technet.microsoft.com/en-us/library/gg712264.aspx.

Method #1 - Do it manually

Open ADSI Edit, click on Action, Connect To and click Ok, Double Click on Default Naming Context and the DC= that appears below it. Click on the + and scroll down to CN=System. Right Click on CN=System and choose New, Object, choose Container from the options, click Next and enter System Management as the value.

system management container.png

Method #2 - Automate it with PowerShell

To create the System Management container automatically, use the Create System Management container.ps1 PowerShell script.

system management container with PowerShell.png

Step 5. Delegate Permission

Note: Perform the following on the Active Directory Domain Controller server (AD01) as Local Administrator

 

Method #1 - Do it manually

Open Active Directory Users and Computers. Click on view, select Advanced Features. Select the System Management Container, and right click it, choose All Tasks and Delegate Control.

delegate control.png

When the Welcome to Delegation of Control Wizard appears click next, then click Add. click on Object Types, select Computers. Type in your Configuration Manager server name (CM01) and click on Check Names, it should resolve. Click Ok, then Next.

Choose Create a Custom Task to Delegate, click next, make sure This folder, existing objects in this folder and creation of new objects in this folder is selected. Click next, select the 3 permissions General, Property-Specific and Creation-deletion of specific child objects are selected then place a check mark in Full Control.

delagated.png

Tip: Repeat the above process for each site server that you install in a Hierarchy.

 

Method #2 - Automate it with PowerShell

To delegate permissions to the System Management container automatically, use the Delegate Permissions.ps1 PowerShell script on CM01. That's right, on the ConfigMgr server.

Note: You need to start Windows PowerShell ISE as a user that has Administrative Permissions in AD.

delegate permissions with powershell.png

 

Step 6. Install Roles and Features on CM01

Note: Perform the following on the Configuration Manager server (CM01) as a Local Administrator

To support various features in System Center Configuration Manager, the setup wizard requires some Server Roles and Features pre-installed. On CM01, login as the username you added to the Local Administrators group and navigate to C:\Scripts. The XML files within the Scripts Used in This Guide.zip were created using the Export Configuration File option in Server Manager after manually installing roles and features and the accompanying PowerShell script simply installs it.

Note: Make sure your Server 2016 media is in the drive specified in the script or edit the script to point to the location of the media.

Method #1 - Do it manually

The role and feature requirements for ConfigMgr are listed here https://technet.microsoft.com/library/gg682077.aspx#BKMK_SiteSystemRolePrereqs 

Method #2 - Automate it with PowerShell

To install the roles and features needed, start Windows Powershell ISE as Administrator and run the install roles and features.ps1 script.

install roles and features configmgr.png

 

Step 7. Download and install Windows ADK 10 version 1703 and WDS

Note: Perform the following on the Configuration Manager server (CM01) as a Local Administrator

The ConfigMgr prerequisite checker will check for various things, including ADK components such as USMT and Windows Preinstallation Environment (amongst others), therefore you need to install Windows ADK on your server. To do so, either download ADKsetup from here and manually install it or run the setup ADK and WDS.ps1 PowerShell script to download and install the correct components for you. This script not only downloads the components needed, it's also installs ADK 10 and then installs Windows Deployment Services. The setup ADK and WDS.ps1 PowerShell script is available in the Scripts Used in this Guide zip file.

Note: As of 2017/5/4 ADK 1703 has an installation issue that occurs if you have Secure Boot enabled. To workaround this,  disable secure boot prior to installing it, you can re-enable secure boot after the installation. Update - Michael Niehaus has a regedit fix detailed here - https://blogs.technet.microsoft.com/mniehaus/2017/05/16/quick-workaround-for-adk-1703-issue/

Method #1 - Do it manually

Go to this link and download ADK 1703, install it, then when done, install the Windows Deployment Services service.

Method #2 - Automate it with PowerShell

To download and then install Windows ADK 10 with the components needed, start Windows Powershell ISE as Administrator and run the setup ADK and WDS.ps1 script.

download adk 1703 and install it then install WDS .png

 

Step 8. Install SQL Server 2016

Note: Perform the following on the Configuration Manager server (CM01) as a Local Administrator

The following script will create a ConfigurationFile.ini used to automate the installation of SQL Server 2016, and after it's installed the script will download the SSMS executable (Management Studio) and install it. SQL Server no longer comes with the Management Studio built in, and it's offered as a separate download, don't worry though, my PowerShell script takes care of that for you.

Note: Make sure your SQL Server 2016 media is in the drive specified in the script or edit the script to point to the location of the media.

Method #1 - Do it manually

Install SQL Server 2016 and download and then install SSMS.

Method #2 - Automate it with PowerShell

To install SQL Server2016 use the Install SQL Server 2016.ps1 script.

Note: The script and accompanying INI file have the path pointing at E:\Program Files, please change the path as appropriate.

1. Copy the script to C:\scripts.

2. Edit the variables [lines 17-75] as desired before running.

3. Start Windows PowerShell ISE as Administrator and run the script by clicking on the green triangle.

installing sql server 2016.png

 

Step 9. SQL Memory Configuration

Note: Perform the following on the Configuration Manager server (CM01) as a Local Administrator

Depending on your memory configuration and server setup, you may also want to configure SQL memory limits as per the following guidance prior to installing ConfigMgr otherwise you'll get warnings in the Prerequisite checker when it runs the Server Readiness checks.

Configuration Manager requires SQL Server to reserve a minimum of 8 gigabytes (GB) of memory for the central administration site and primary site and a minimum of 4 gigabytes (GB) for the secondary site. This memory is reserved by using the Minimum server memory setting under Server Memory Options and is configured by using SQL Server Management Studio. For more information about how to set a fixed amount of memory, see here.
If your SQL Server is configured for unlimited memory usage, you should configure SQL Server memory to have a maximum limit.

Method #1 - Do it manually

Open Management Studio, select CM01, right click, choose Properties, select memory and configure the values as appropriate for your environment.

8192.png

 

Method #2 - Automate it with PowerShell

Use the following PowerShell in ISE on the server that you installed SQL Server 2016 on, thanks go to SkatterBrainz for the code snippet, you might want to adjust the $SqlMemMin and $SqlMemMax variables to suit your environment.

sql server memory powershell.png

Step 10. Restart the ConfigMgr Primary Server

Note: Perform the following on the Configuration Manager server (CM01) as a Local Administrator

Open an administrative command prompt and issue the following command:

shutdown /r

Step 11. Install the WSUS role

Note: Perform the following on the Configuration Manager server (CM01) as a Local Administrator

Now that SQL server is installed, we can utilize SQL Server for the WSUS database. To install WSUS and configure it to use the SQL server database instead of the Windows Internal Database, do as follows:

Method #1 - Do it manually

Using Roles and Features in Server Manager, add WSUS.

Method #2 - Automate it with PowerShell

Browse to the location where you extracted the scripts, C:\scripts. Start Windows PowerShell ISE as administrator, open the Install roles and features_WSUS.ps1 script, edit the $servername variable and replace CM01 with the ServerName your are installing ConfigMgr on (SQL server).

Note: Make sure to have your Windows Server 2016 SXS media in the path referred to by $Sourcefiles.

installing WSUS.png

Step 12. Download and extract the ConfigMgr content

Note: Perform the following on the Configuration Manager server (CM01) as a Local Administrator

To install System Center Configuration Manager version 1702 you'll need to download the content. You can download it from Microsoft's Volume licensing Service Center site for use in production or from MSDN for use in a lab. The VLSC download can be found be searching for Config and then selecting System Center Config Mgr (current branch and LTSB) as shown below.

1702 vlsc.png

 

Method #1 - Do it manually

For the purposes of this guide I used the 1702 release from VLSC. This iso is named:

SW_DVD5_Sys_Ctr_ConfigMgrClt_ML_1702_MultiLang_ConfMgr_SCEP_MLF_X21-37386.ISO

Once downloaded, I mounted the ISO in Windows File Explorer and copied the contents to C:\Source\SCCM 1702 on CM01.

Step 13. Download the ConfigMgr Prerequisites

Note: Perform the following on the Configuration Manager server (CM01) as a Local Administrator

Method #1 - Do it manually

You can download the prerequisites during ConfigMgr setup or in advance. As you'll probably want to install more than one copy of ConfigMgr (one lab, one production) it's nice to have the prerequisites downloaded in advance. To do that, open a PowerShell prompt with administrative permissions and navigate to the following folder:

C:\Source\SCCM 1702\smssetup\bin\X64

Run the following line

.\SetupDL.exe C:\Source\Downloads

prereqs.png

 

Tip: Browse to C:\source\SCCM 1702\SMSSETUP\TOOLS and double click on CMTrace.exe, answer Yes to the default logging question. Then, using Windows File Explorer, browse to C:\ and double click on ConfigMgrSetup.log which will open the log file in CMTrace. This will allow you to view any errors or problems with the download of the prerequisites in real time.

Method #2 - Automate it with PowerShell

Coming soon.

Step 14. Extend the Schema

Note: Perform the following on the Domain controller server (AD01) as Administrator. You do not have to extend the Active Directory schema if it was already extended for Configuration Manager previously.

Method #1 - Do it manually

1. Using Windows File Explorer on the Active Directory Domain Controller, browse to \\<server>\c$\Source\SCCM 1702\SMSSETUP\BIN\X64 where <server> is your ConfigMgr server

2. Locate extadsch.exe, right click and choose Run As Administrator.

3. A command prompt window will appear briefly as the schema is extended, check in C:\ for a log file called ExtADSch.log it should look similar to this

extend schema.png

Method #2 - Automate it with PowerShell

Coming soon.

Step 15. Install SCCM Current Branch (version 1702)

Note: Perform the following on the ConfigMgr server (CM01) as Administrator. 

Note: If you are NOT using an evaluation version of SCCM then you need to add the section below in blue to the configuration.ini file which is contained within the PowerShell script, and you need to change  the ProductId open the script in Windows ISE, locate the line that reads $ProductID= and enter your ConfigMgr Product Key.

[SABranchOptions]
SAActive=1
CurrentBranch=1

not eval.png

Method #1 - Do it manually

Install SCCM Current Branch using the wizard.

Method #2 - Automate it with PowerShell

You will need to edit the Install SCCM Current Branch version 1702.ps1 script and replace the variables inside with those that work in your environment.

1. Copy the script to C:\scripts.

2. Edit the variables [lines 16-17 & lines 32-57] as desired before running.

3. Start Windows PowerShell ISE as Administrator and run the script by clicking on the green triangle.

install sccm cb version 1702.png

Tip: Use CMTrace to open C:\ConfigMgrSetup.log to monitor the installation of ConfigMgr as it happens.

configmgrsetup.png

Once the script completes successfully, System Center Configuration Manager Current Branch (version 1702) is installed.

1702 is installed.png

Success !

Summary

In this guide you used quite a bit of PowerShell to automate pretty much most of Installing System Center Configuration Manager Current Branch (version 1702), including installing and configuring SQL Server 2016 on Windows Server 2016. Doing it this way means you can safely say that you've got a handle on Automation using PowerShell, heck, you could even call yourself a 'geek with an attitude'.

I hope you learned a lot from doing it this way, and until next time, adios !

Downloads

The scripts used above are available in the zip below.

Scripts.zip

 

Share this post


Link to post
Share on other sites


pej1025    1

Hey Niall

You may want to note in the ADK installation section that secure boot needs to stay disabled if any DISM related functions need to execute.  I ran into this issue when I tried to add optional components to my boot image which resulted in the "failed to insert osd binaries" error.  Once I disabled secure boot, everything worked again!

  • Like 1

Share this post


Link to post
Share on other sites
anyweb    399

good point and thanks for adding it i'll update it tomorrow !

 

Share this post


Link to post
Share on other sites

Hi Niall,

I have a quick question. We have been using SCCM 2012 for years. I did not set it up originally and am not happy with some of the decisions that were made so I am "upgrading" to 1702, Server 16, SQL 16 but am setting it up from scratch rather than doing a true upgrade. My question would be do I still need to do the Active Directory steps or is that already done from 2012? I guess what I am really asking is, is there anything I should watch out for when spinning up a new server with new a sccm installation and using it in an environment that already had 2012 running?

Share this post


Link to post
Share on other sites
anyweb    399

more than likely the AD steps are already done but you should verify (easy enough), are you going to create a new site code and start fresh or what ? do you already have clients installed ? if you have any issues raise a new topic here and we'll help :)

Share this post


Link to post
Share on other sites
xerxes2985    1

Good Evening Niall,

Do you know of any issues of running SCCM 1702, with SQL Server 2012 (11.1.3000.0) or should I be looking to upgrade it?

Thanks

Share this post


Link to post
Share on other sites
anyweb    399

hi there, it's still supported but i'd consider upgrading now rather than later

 

https://docs.microsoft.com/en-us/sccm/core/plan-design/configs/support-for-sql-server-versions

 

SQL Server 2012 SP2: Standard, Enterprise

You can use this version of SQL Server with no minimum cumulative update version for the following:

  • A central administration site
  • A primary site
  • A secondary site

Share this post


Link to post
Share on other sites
xerxes2985    1
20 hours ago, anyweb said:

hi there, it's still supported but i'd consider upgrading now rather than later

 

https://docs.microsoft.com/en-us/sccm/core/plan-design/configs/support-for-sql-server-versions

 

SQL Server 2012 SP2: Standard, Enterprise

You can use this version of SQL Server with no minimum cumulative update version for the following:

  • A central administration site
  • A primary site
  • A secondary site

Thanks Niall for the quick response!

Share this post


Link to post
Share on other sites
n4rk0o    1

Hello guys,

I'm trying to install SCCM CB 1702 on Windows 2016 with SQL Server 2016 SP1 CU3 (both on a standalone server for a Primary Site) but I have many errors.

1. I have a warning about the System Management container but the rights needed for the computer account are correctly set. How can I be sure everything is OK?

2. If I start the install, it failed not at the same step every time I try to install SCCM but it is always at the SQL Server configuration step.

Here is the most relevant error in the logs:

*** -- ~-- Name         : spConfigureCASForSitePartitionTable ~-- Version      : 5.0.8498.1010 ~-- Definition   : SqlSetupObjs ~-- Object       : P ~-- Dependencies : <Detect> ~-- Description  : <Please provide a description for this object> ~-- ~CREATE PROCEDURE spConfigureCASForSitePartitionTable @TableName SYSNAME, @PartitionColumn NVARCHAR(92) AS ~BEGIN  ~    SET NOCOUNT ON  ~  ~    DECLARE @TableNamePartition SYSNAME ~    DECLARE @PartitionFunction SYSNAME ~    DECLARE @PartitionScheme SYSNAME ~    DECLARE @SQLView NVARCHAR(MAX) ~    DECLARE @SQL NVARCHAR(MAX) ~    DECLARE @InsteadOfTigger NVARCHAR(MAX) ~    DECLARE @ID INT ~    DECLARE @Error INT = 0 ~    DECLARE @CRLF NVARCHAR(2) = CHAR(13) + CHAR(10) ~ ~    IF dbo.fnIsCas() = 0 RETURN -1 ~ ~    -- Only Enterprise edition supports partitioning ~    IF SERVERPROPERTY('EngineEdition') != 3 RETURN 0 ~ ~    IF dbo.fnIsValidSiteTableToPartition(@TableName) = 0 ~    BEGIN ~        PRINT ('Object ' + @TableName + ' does not need to be partitioned.') ~        RETURN 1 ~    END ~  ~    SET @Error = 0  ~ ~    -- 1. Create partition function ~    EXEC @Error = dbo.spAddPartitionFunction @TableName, @PartitionColumn, @PartitionFunction OUTPUT ~    IF @Error != 0 GOTO ERROR  ~ ~    -- 2. Create partition scheme ~    EXEC @Error = dbo.spAddPartitionScheme @PartitionFunction, @PartitionScheme OUTPUT ~    IF @Error != 0 GOTO ERROR  ~ ~    -- 3. Add partition scheme to table ~    IF NOT EXISTS (SELECT * FROM SYS.TABLES T INNER JOIN SYS.INDEXES I ON T.OBJECT_ID = I.OBJECT_ID ~                   INNER JOIN SYS.DATA_SPACES D ON I.DATA_SPACE_ID = D.DATA_SPACE_ID ~                   WHERE T.NAME = @TableName AND D.name = @PartitionScheme) ~    BEGIN ~        EXEC @Error = spConfigureSitePartitionTable @TableName, @PartitionScheme, @PartitionColumn ~        IF @Error != 0 GOTO ERROR  ~    END ~ ~ERROR:  ~    RETURN @Error;  ~END
-------  
*** [42000][9002][Microsoft][SQL Server Native Client 11.0][SQL Server]The transaction log for database 'CM_XXX' is full due to 'ACTIVE_TRANSACTION'. : spConfigureCASForSitePartitionTable	Configuration Manager Setup	5/17/2017 4:40:09 PM	4272 (0x10B0)
-------
Failed to execute sql command -- ~-- Name         : spConfigureCASForSitePartitionTable ~-- Version      : 5.0.8498.1010 ~-- Definition   : SqlSetupObjs ~-- Object       : P ~-- Dependencies : <Detect> ~-- Description  : <Please provide a description for this object> ~-- ~CREATE PROCEDURE spConfigureCASForSitePartitionTable @TableName SYSNAME, @PartitionColumn NVARCHAR(92) AS ~BEGIN  ~    SET NOCOUNT ON  ~  ~    DECLARE @TableNamePartition SYSNAME ~    DECLARE @PartitionFunction SYSNAME ~    DECLARE @PartitionScheme SYSNAME ~    DECLARE @SQLView NVARCHAR(MAX) ~    DECLARE @SQL NVARCHAR(MAX) ~    DECLARE @InsteadOfTigger NVARCHAR(MAX) ~    DECLARE @ID INT ~    DECLARE @Error INT = 0 ~    DECLARE @CRLF NVARCHAR(2) = CHAR(13) + CHAR(10) ~ ~    IF dbo.fnIsCas() = 0 RETURN -1 ~ ~    -- Only Enterprise edition supports partitioning ~    IF SERVERPROPERTY('EngineEdition') != 3 RETURN 0 ~ ~    IF dbo.fnIsValidSiteTableToPartition(@TableName) = 0 ~    BEGIN ~        PRINT ('Object ' + @TableName + ' does not need to be partitioned.') ~        RETURN 1 ~    END ~  ~    SET @Error = 0  ~ ~    -- 1. Create partition function ~    EXEC @Error = dbo.spAddPartitionFunction @TableName, @PartitionColumn, @PartitionFunction OUTPUT ~    IF @Error != 0 GOTO ERROR  ~ ~    -- 2. Create partition scheme ~    EXEC @Error = dbo.spAddPartitionScheme @PartitionFunction, @PartitionScheme OUTPUT ~    IF @Error != 0 GOTO ERROR  ~ ~    -- 3. Add partition scheme to table ~    IF NOT EXISTS (SELECT * FROM SYS.TABLES T INNER JOIN SYS.INDEXES I ON T.OBJECT_ID = I.OBJECT_ID ~                   INNER JOIN SYS.DATA_SPACES D ON I.DATA_SPACE_ID = D.DATA_SPACE_ID ~                   WHERE T.NAME = @TableName AND D.name = @PartitionScheme) ~    BEGIN ~        EXEC @Error = spConfigureSitePartitionTable @TableName, @PartitionScheme, @PartitionColumn ~        IF @Error != 0 GOTO ERROR  ~    END ~ ~ERROR:  ~    RETURN @Error;  ~END	Configuration Manager Setup	5/17/2017 4:40:09 PM	4272 (0x10B0)
-------
ERROR: Failed to execute SQL Server script: Create object spconfigurecasforsitepartitiontable	Configuration Manager Setup	5/17/2017 4:40:09 PM	4272 (0x10B0)
------- 
ERROR: SQL Server error: <>	Configuration Manager Setup	5/17/2017 4:40:09 PM	4272 (0x10B0)

  

I read that sometimes the ISO can be corrupted or something like that and I don't understand why but if someone have a feedback about it, it could be great :)

Thx

 

Share this post


Link to post
Share on other sites
anyweb    399

so just to be clear, are you using my guide above or are you doing this your own way, if so, please raise a separate topic thanks

 

Share this post


Link to post
Share on other sites
n4rk0o    1

I'm following your guide, except for the Active Directory part, BUT, I can create a new topic if needed.

EDIT: Solution is here => 

 

Share this post


Link to post
Share on other sites
SCCM N00B    0

Great article so far. I'm just going through the steps to become familiar with the process and to build a lab environment once I have the process down.

I'm using the script to install SQL Server 2016 and it seemed to ignore my desired location that I configured in your script. It installed to C:\Program Files instead of D:\Program Files. Once the SQL installation was executed in the PowerShell ISE, the install time using the script was about 15 minutes.

This is the configurationfile.ini that was created/updated in the c:\scripts folder.

[OPTIONS]
Action="Install"
ErrorReporting="False"
Quiet="True"
Features="SQLENGINE,RS,CONN,IS,BC,SDK,BOL"
InstanceName="MSSQLSERVER"
InstanceDir="D:\Program Files\Microsoft SQL Server"
SQLSVCAccount="NT AUTHORITY\System"
SQLSysAdminAccounts="windowsnoob\buildtest"
SQLSVCStartupType="Automatic"
AGTSVCACCOUNT="NT AUTHORITY\SYSTEM"
AGTSVCSTARTUPTYPE="Automatic"
RSSVCACCOUNT="NT AUTHORITY\System"
RSSVCSTARTUPTYPE="Automatic"
ISSVCACCOUNT="NT AUTHORITY\System" 
ISSVCSTARTUPTYPE="Disabled"
ASCOLLATION="Latin1_General_CI_AS"
SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
TCPENABLED="1"
NPENABLED="1"
IAcceptSQLServerLicenseTerms="True"

This is from the install sql server 2016.ps1 script:

# below variables are customizable
$folderpath="c:\Scripts"
$inifile="$folderpath\ConfigurationFile.ini"
# next line sets user as a SQL sysadmin
$yourusername="windowsnoob\buildtest"
# path to the SQL media
$SQLsource="J:\"
# configurationfile.ini settings https://msdn.microsoft.com/en-us/library/ms144259.aspx
$ACTION="Install"
$ASCOLLATION="Latin1_General_CI_AS"
$ErrorReporting="False"
$SUPPRESSPRIVACYSTATEMENTNOTICE="False"
$IACCEPTROPENLICENSETERMS="False"
$ENU="True"
$QUIET="True"
$QUIETSIMPLE="False"
$UpdateEnabled="True"
$USEMICROSOFTUPDATE="False"
$FEATURES="SQLENGINE,RS,CONN,IS,BC,SDK,BOL"
$UpdateSource="MU"
$HELP="False"
$INDICATEPROGRESS="False"
$X86="False"
$INSTANCENAME="MSSQLSERVER"
$INSTALLSHAREDDIR="D:\Program Files\Microsoft SQL Server"
$INSTALLSHAREDWOWDIR="D:\Program Files (x86)\Microsoft SQL Server"
$INSTANCEID="MSSQLSERVER"
$RSINSTALLMODE="DefaultNativeMode"
$SQLTELSVCACCT="NT Service\SQLTELEMETRY"
$SQLTELSVCSTARTUPTYPE="Automatic"
$ISTELSVCSTARTUPTYPE="Automatic"
$ISTELSVCACCT="NT Service\SSISTELEMETRY130"
$INSTANCEDIR="D:\Program Files\Microsoft SQL Server"
$AGTSVCACCOUNT="NT AUTHORITY\SYSTEM"
$AGTSVCSTARTUPTYPE="Automatic"
$ISSVCSTARTUPTYPE="Disabled"
$ISSVCACCOUNT="NT AUTHORITY\System"
$COMMFABRICPORT="0"
$COMMFABRICNETWORKLEVEL="0"
$COMMFABRICENCRYPTION="0"
$MATRIXCMBRICKCOMMPORT="0"
$SQLSVCSTARTUPTYPE="Automatic"
$FILESTREAMLEVEL="0"
$ENABLERANU="False"
$SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
$SQLSVCACCOUNT="NT AUTHORITY\System"
$SQLSVCINSTANTFILEINIT="False"
$SQLSYSADMINACCOUNTS="$yourusername"
$SQLTEMPDBFILECOUNT="1"
$SQLTEMPDBFILESIZE="8"
$SQLTEMPDBFILEGROWTH="64"
$SQLTEMPDBLOGFILESIZE="8"
$SQLTEMPDBLOGFILEGROWTH="64"
$ADDCURRENTUSERASSQLADMIN="True"
$TCPENABLED="1"
$NPENABLED="1"
$BROWSERSVCSTARTUPTYPE="Disabled"
$RSSVCACCOUNT="NT AUTHORITY\System"
$RSSVCSTARTUPTYPE="Automatic"
$IAcceptSQLServerLicenseTerms="True"

 

Have a great day!

Edited by SCCM N00B

Share this post


Link to post
Share on other sites

I am running into a problem when I am installing SCCM from the script. It is telling me the product code is incorrect

7/24/2017 12:30:49 PM: ConfigMgrSetupWizard Verbose: 1 : Received error [The product key is not correct.  You must enter the entire 25 digit product key.] from native code.
 

I know I can install it without the script as it takes the license key just fine manually but I would like to see what I am doing wrong with the script.

Share this post


Link to post
Share on other sites
anyweb    399

look at step 15 again, I updated it, see this part:

 

Note: If you are NOT using an evaluation version of SCCM then you need to add the section below in blue to the configuration.ini file which is contained within the PowerShell script, and you need to change  the ProductId open the script in Windows ISE, locate the line that reads $ProductID= and enter your ConfigMgr Product Key.

[SABranchOptions]
SAActive=1
CurrentBranch=1

 

 

did you do that ? and did you enter the product key ?

Share this post


Link to post
Share on other sites

This is what I have (with the correct product key):

 

I also just noticed the configmgrsetup.log shows <07-24-2017 12:30:49> Failed to create process of SetupWpf.exe. return value 1         1/1/1601 12:00:00 AM    286688080 (0x11168350)

 

Capture.PNG

Share this post


Link to post
Share on other sites
anyweb    399

can you email me the log and powershell script so i can take a look niall@windows-noob.com, you can remove the key

Share this post


Link to post
Share on other sites
anyweb    399

so we had a chat offline and it seems there were some problems when running the script, paste errors perhaps, anyway, it's now working fine and installing :)

Share this post


Link to post
Share on other sites

Thanks for the help Niall. Was the FQDN issue causing the product id error? 
I was confused because the log originally said success for the FQDN. My bad on that one.

Share this post


Link to post
Share on other sites
anyweb    399

hi Jeff, it seemed to be a combination of product key issue (maybe it was pasted incorrectly, try pasting stuff into notepad first, then into the script), and your FQDN's

Share this post


Link to post
Share on other sites
rip    0
On 5/5/2017 at 8:10 AM, Jeff May-Stahl said:

Hi Niall,

I have a quick question. We have been using SCCM 2012 for years. I did not set it up originally and am not happy with some of the decisions that were made so I am "upgrading" to 1702, Server 16, SQL 16 but am setting it up from scratch rather than doing a true upgrade. My question would be do I still need to do the Active Directory steps or is that already done from 2012? I guess what I am really asking is, is there anything I should watch out for when spinning up a new server with new a sccm installation and using it in an environment that already had 2012 running?

Hi Jeff, 

I'm in a similar situation where I just joined a new company and have to upgrade the existing 2012 RTM environment and I'm thinking it's going to be easier to set up a new 1702 installation from scratch rather than upgrading multiple times. Did you run into any issues standing up a new instance of SCCM with an existing, like using the same System Management container, etc? Or anyone else who may have been through this/have knowledge to share on the process?

Thanks!

Share this post


Link to post
Share on other sites

It is not the most user friendly system to upgrade/move, but a possible. PXE (if you use it) will be a problem, as the scope will be most likely the same for both

Migration works well, but workstation object when migrated looses MAC/GUID (hence is as good as NONE - I do NOT use unknown computers and never will!), so they must be re-created (not much of an issue really)

Applications/Packages/drivers must have source path corrected (unless you are using the same) - again easy with a script to do it en masse

Then everything need to be redistributed (unless you do it during migration, I did not even want to think about it)

Site change on existing clients does not work well (but a possible with a cheat - you can search for my post on MS forums)

So a lot of work, all in all.

Sombody can have different experiences, and if they better than mine, then well done to them!

Share this post


Link to post
Share on other sites
rntmon    1

When I get to the SQL 2016 installation step, using the script you provided (modifed for my environment, of course), I get an error in a pop-up dialog box:

An unknown command-line option [/CONFIGURATIONFILE=C:\Scripts\ConfigurationFile.ini] was specified.

I've tried several things but can't seem to get past this. Thoughts?

Share this post


Link to post
Share on other sites
anyweb    399

i'd need to see all your edits to determine why it's failed, send the edited script to me niall@windows-noob.com

Share this post


Link to post
Share on other sites
rntmon    1

I found the issue - minimal rights in C:\scripts. I gave appropriate rights and everything ran fine. Not really sure why rights were so limited in the first place but glad it's now working.

  • Haha 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×