Closed fm-knopfler closed 4 months ago
I experience exactly the same.
Can you try to use "E:\\"
? I think the problem is inside of the setup.exe with the \"
at the end of the parameter.
I could just successfully install a 2022 version into C: using a dubble backslash. I will provide a fix for that.
I can confirm, that the installation works when using "E:\\"
for InstancePath
(using version 2.1.10). It didn't matter if paths for parameters "DataPath", "LogPath", "TempPath", "BackupPath"
started with "E:\\"
or "E:\"
.
Import-Module dbatools -RequiredVersion "2.1.10"
$svcCred = Get-Credential
$installparams = @{
"Version" = 2022
"Path" = "D:"
"InstanceName" = "SQL22_S01"
"Feature" = "Engine"
"InstancePath" = "E:\\"
"DataPath" = "E:\SQL22_S01\MSSQL\Data"
"LogPath" = "E:\SQL22_S01\MSSQL\Log"
"TempPath" = "E:\SQL22_S01\MSSQL\TempDB"
"BackupPath" = "E:\Backup"
"AdminAccount" = "administrator"
"EngineCredential" = $svcCred
"AgentCredential" = $svcCred
"AuthenticationMode" = "Mixed"
"PerformVolumeMaintenanceTasks" = $true
"Verbose" = $true
"Configuration" = @{
"SQLMINMEMORY" = 2048
"SQLMAXMEMORY" = 2048
}
"SaveConfiguration" = "C:\SQL2022.ini"
"SqlCollation" = "Latin1_General_CI_AS"
"Port" = "50001"
"Confirm" = $false
}
Install-DbaInstance @installparams
Will open a PR with a fix later today.
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
Steps to Reproduce
Please confirm that you are running the most recent version of dbatools
2.1.6
Other details or mentions
This error occurs, when setting
"InstancePath" = "E:\"
or the root folder of any drive in Windows. The issue is similar to #8627, but still occurs using the latest version of dbatools.The following values lead to the same result for me:
"E:"
'E:'
"E:\"
'E:\'
Using a non-root folder like
"E:\Inst01"
worked as excpected.Installation Config and Summary:
SQL2022.ini.txt Summary.txt
Note the following entry ate line 97 in summary.txt:
INSTANCEDIR: E:"
What PowerShell host was used when producing this error
Windows PowerShell ISE (powershell_ise.exe)
PowerShell Host Version
SQL Server Edition and Build number
Sql Server is not yet installed. A Sql Server 2022 installation image was used. Using Sql Server 2019, the result is the same.
.NET Framework Version