I am running the script (Program Files\Microsoft Configuration Manager\cd.latest\SMSSETUP\BIN\X6\MBAMWebSiteInstaller.ps1) that is provided by Microsoft and it is generating the following error:
Set-MachineUserOnSql : Unable to set permissions for machine on SQL server: Exception calling "Open" with "0" argument(s): "A connection was successfully established with the server, but then an error occurred during the login
process. (provider: SSL Provider, error: 0 - The target principal name is incorrect.)"
At D:\Program Files\Microsoft Configuration Manager\cd.latest\SMSSETUP\BIN\X64\MBAMWebSiteInstaller.ps1:1371 char:16
+ $success = Set-MachineUserOnSql
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Set-MachineUserOnSql
Install-MBAMWebSites : Failure setting machine account privileges on SQL
At D:\Program Files\Microsoft Configuration Manager\cd.latest\SMSSETUP\BIN\X64\MBAMWebSiteInstaller.ps1:1520 char:5
+ Install-MBAMWebSites -SqlServerName $SqlServerName -SqlInstanceNa ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-MBAMWebSites
The SPN exists as follows (replace the obvious with my site specific info):
CN=HOSTNAME,OU=Final,DC=fully,DC=qualified,DC=com
MSOLAPSvc.3/HOSTNAME.FQDN:TEST_SCCM
MSOLAPSvc.3/HOSTNAME:TEST_SCCM
MSSQLSvc/HOSTNAME.FQDN
CmRcService/HOSTNAME
CmRcService/HOSTNAME.FQDN
WSMAN/HOSTNAME
WSMAN/HOSTNAME.FQDN
TERMSRV/HOSTNAME
TERMSRV/HOSTNAME.FQDN
RestrictedKrbHost/HOSTNAME
HOST/HOSTNAME
RestrictedKrbHost/HOSTNAME.FQDN
HOST/HOSTNAME.FQDN
The account running the script has sysadmin rights on the database.