2

I'm trying to install Sitecore 9.3.0 using SIA: https://tothecore.sk/2019/11/28/installing-sitecore-9-3-using-sitecore-install-assistant-sia/ and I keep getting this error:

[------------ XConnectXP0_CreateShards : Command -----------------------------] [ShardingTool - Create]:[Path] C:\inetpub\wwwroot\sc93xconnect.dev.local\App_Data\collectiondeployment\Sitecore.Xdb.Collection.Database.SqlShardingDeploymentTool.exe

[ XConnectXP0_CreateShardApplication... : InvokeSqlcmd ------------------------] A parameter cannot be found that matches parameter name 'Credential'. This error might have been caused by applying the default parameter binding. You can disable the default parameter binding in $PSDefaultParameterValues by setting $PSDefaultParameterValues["Disabled"] to be $true, and then trying again. The following default parameters were successfully bound for this cmdlet when the error occurred: -Debug -WarningAction -Verbose -InformationAction -ErrorAction

Have anyone encoutered this issue?

3
  • I also tried setting up the param value: $PSDefaultParameterValues["Disabled"] = $true
    – iusmar
    Feb 6 '20 at 14:57
  • Are you installing using Azure SQL?
    – Chris Auer
    Feb 6 '20 at 18:10
  • No, I am installing it on my dev machine. The below answer is the solution
    – iusmar
    Feb 7 '20 at 9:41
5

This is the task that it is failing for you during the installation process:

"CreateShardApplicationDatabaseServerLoginInvokeSqlCmd": {
            "Description": "Create Collection Shard Database Server Login.",
            "Type": "InvokeSqlcmd",
            "Params": {
                "ServerInstance": "[parameter('SqlServer')]",
                "Credential": "[variable('Sql.Credential')]",
                "InputFile": "[variable('Sharding.SqlCmd.Path.CreateShardApplicationDatabaseServerLogin')]",
                "Variable": [
                    "[concat('UserName=',variable('SqlCollection.User'))]",
                    "[concat('Password=',variable('SqlCollection.Password'))]"
                ]
            },
            "Skip": "[parameter('SkipDatabaseInstallation')]"
        }

This task uses the Invoke-Sqlcmd command.

According to the accepted answer on this Stackoverflow question, it seems that your issue might be caused by the fact that Microsoft has two versions of Invoke-Sqlcmd:

  1. The Database Engine - no -Credentials parameter.
  2. The SqlServer module - -Credentials parameter is available.

And one of them doesn't use the -Credentials parameter.

As suggested, try to run the following command to install the correct module on your machine:

Install-Module -Name SqlServer -AllowClobber

And then try the installation process again.

2
  • Thank you Alessandro, this solved my problem
    – iusmar
    Feb 7 '20 at 9:41
  • 1
    Thanks! One other note for anyone encountering this issue, you may need to close/restart your console app/window (depending on the console you use) after installing the new SqlServer PS module in order for the installer to use the new module.
    – Adam Weber
    May 1 '20 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.