NT service\SQLTELMETRY provided for NT service\SQLTELMETRY$XCLERAINST is either not a valid account or cannot be used for this service

Jimmy Afflick 20 Reputation points
2024-05-09T04:53:35.4933333+00:00

Hi Experts,

While I was trying to install the 2019 MS SQL via PowerShell. I am getting the below error message.

The following error occured: NT service\SQLTELMETRY provided for NT service\SQLTELMETRY$XCLERAINST is either not a valid account or cannot be used for this service

I have pasted my Configuration.ini file below.

I have no idea what went wrong. Could someone please help me to fix this issue.

I am looking forward to hearing from you.

$UnattendedINIContent =

@"

[OPTIONS]

ACTION="Install"

SUPPRESSPRIVACYSTATEMENTNOTICE="False"

IACCEPTROPENLICENSETERMS="True"

IAcceptSQLServerLicenseTerms="True"

ENU="True"

QUIET="False"

QUIETSIMPLE="True"

;UIMODE="Normal"

UpdateEnabled="False"

USEMICROSOFTUPDATE="False"

SUPPRESSPAIDEDITIONNOTICE="False"

UpdateSource="MU"

FEATURES=SQLENGINE,CONN,IS,BC

HELP="False"

INDICATEPROGRESS="False"

X86="False"

INSTANCENAME="XCELERAINST"

INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"

INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"

INSTANCEID="XCELERAINST"

SQLTELSVCACCT="NT Service\SQLTELEMETRY$XCELERAINST"

SQLTELSVCSTARTUPTYPE="Automatic"

ISTELSVCSTARTUPTYPE="Automatic"

ISTELSVCACCT="NT Service\SSISTELEMETRY150"

INSTANCEDIR="D:\Instance"

AGTSVCACCOUNT="NT Service\SQLAgent$XCELERAINST"

AGTSVCSTARTUPTYPE="Automatic"

ISSVCSTARTUPTYPE="Automatic"

ISSVCACCOUNT="NT Service\MsDtsServer150"

COMMFABRICPORT="0"

COMMFABRICNETWORKLEVEL="0"

COMMFABRICENCRYPTION="0"

MATRIXCMBRICKCOMMPORT="0"

SQLSVCSTARTUPTYPE="Automatic"

FILESTREAMLEVEL="0"

SQLMAXDOP="6"

ENABLERANU="False"

SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"

SQLSVCACCOUNT="NT Service\MSSQL$XCELERAINST"

SQLSVCINSTANTFILEINIT="False"

SQLSYSADMINACCOUNTS="$UserDomain\PHIAdmin" "$UserDomain\Philips"

SQLTEMPDBFILECOUNT="8"

SQLTEMPDBFILESIZE="8"

SQLTEMPDBFILEGROWTH="64"

SQLTEMPDBLOGFILESIZE="8"

SQLTEMPDBLOGFILEGROWTH="64"

ADDCURRENTUSERASSQLADMIN="False"

TCPENABLED="1"

NPENABLED="0"

BROWSERSVCSTARTUPTYPE="Automatic"

SQLMAXMEMORY="2147483647"

SQLMINMEMORY="0"

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,853 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,399 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,131 questions
{count} votes

Accepted answer
  1. Erland Sommarskog 102.2K Reputation points MVP
    2024-05-09T11:24:57.7133333+00:00

    It seems that in this place you wanted string interpolation to happen. Then again, is there any particular reason why you have the domain in a variable?

    But if you want to do that, you need to go back to using @" and "@ as string delimiters, and you need to escape the $ you want to be taken literary with a backtick, `. See the image below:

    User's image

    The reason I did not say this at first is because my knowledge of PowerShell is rudimentary, but I recognised the pattern from Perl. However, Perl uses a different escape character.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Erland Sommarskog 102.2K Reputation points MVP
    2024-05-09T08:57:49.25+00:00

    You need to enclose the string in single quotes rather than double quotes. Else PowerShell interpolates things starting with $, thinking they are variables. Screenshot below illustrates.

    User's image


  2. Rich Matheisen 45,111 Reputation points
    2024-05-09T15:05:06.7+00:00

    As @Erland Sommarskog pointed out, quoting can be a problem when you need to mix the use of single- and double-quotes and, at the same time disable string interpolation.

    On way to avoid that is to remove the parts of the Here-String that include what PowerShell sees as variable names from the string and replace them with variable names that you initialize outside the Here-String.

    For example:

    $UserDomain = "ThisDomain"		# if the "$" isn't part of the domain name
    $UserDomain = '$UserDomain'     # OR this way if the '$' is part of the domain name
    
    $SQLTELSVCACCT='NT Service\SQLTELEMETRY$XCELERAINST'	# single-quoted to avoid string interpolation
    
    $x = @"
    [OPTIONS]
    ACTION="Install"
    SUPPRESSPRIVACYSTATEMENTNOTICE="False"
    SQLSVCADMINACCOUNTS="$UserDomain\PHIAdmin" "$UserDomain\Phillips"
    SQLTELSVCACCT="$SQLTELSVCACCT"
    "@
    
    $x
    

    EDIT: Replaced the trailing double-quote on the 2nd "$UserDomain" value. It should have been a single-quote.