Unable to create bitlocker portals with SCCM provided script.

AlexS 1 Reputation point
2023-02-21T22:24:10.01+00:00

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.

Microsoft Security | Intune | Configuration Manager | Other
Microsoft System Center | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. CherryZhang-MSFT 6,506 Reputation points
    2023-02-22T07:29:56.61+00:00

    Hi @Salisbury, Alex

    1, What is the command line when you run the script MBAMWebSiteInstaller.ps1? Please upload it for our reference.

    2, Do you use the parameters -DomainName? If so, this similar threader maybe can help you.

    The link: https://www.reddit.com/r/SCCM/comments/og8no9/troubles_installing_mbam_sites/

    Note: Microsoft provides third-party contact information to help you understand the problem. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

    Looking forward to your reply.

    Best regards,
    Cherry


  2. AlexS 1 Reputation point
    2023-02-22T22:33:04.6366667+00:00

    I wonder if the issue with the script is that my hostname is not a top level domain? When I run the function for dnsDomain it comes back to something.something.com.


  3. Tor 0 Reputation points
    2025-11-10T13:24:10.07+00:00

    I've stuck with the same issue. did you find a soloution for this?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.