From b8fe96052245edab3e568c11bd43c468a8b0fc8a Mon Sep 17 00:00:00 2001 From: Chrissy LeMaire Date: Mon, 12 Dec 2022 17:04:18 +0100 Subject: [PATCH] Install-DbaInstance - drive path helper (#8684) fixes #8627 --- functions/Install-DbaInstance.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/Install-DbaInstance.ps1 b/functions/Install-DbaInstance.ps1 index f2a415fd39..c72532581d 100644 --- a/functions/Install-DbaInstance.ps1 +++ b/functions/Install-DbaInstance.ps1 @@ -724,6 +724,9 @@ function Install-DbaInstance { $execParams += Update-ServiceCredential -Credential $SaCredential -PasswordName SAPWD # And root folders and other variables if (Test-Bound -ParameterName InstancePath) { + if ($InstancePath.Length -eq 2 -and $InstancePath.Substring(1, 1) -eq ":") { + $InstancePath = "$InstancePath\" + } $configNode.INSTANCEDIR = $InstancePath } if (Test-Bound -ParameterName DataPath) {