diff --git a/functions/Install-DbaMaintenanceSolution.ps1 b/functions/Install-DbaMaintenanceSolution.ps1 index ace078fd0e..de40f7414b 100644 --- a/functions/Install-DbaMaintenanceSolution.ps1 +++ b/functions/Install-DbaMaintenanceSolution.ps1 @@ -234,7 +234,7 @@ function Install-DbaMaintenanceSolution { } # OutputFileDirectory - if (-not $OutputFileDirectory) { + if ($OutputFileDirectory) { $findOutputFileDirectory = 'SET @OutputFileDirectory = NULL' $replaceOutputFileDirectory = 'SET @OutputFileDirectory = N''' + $OutputFileDirectory + '''' $fileContents[$file] = $fileContents[$file].Replace($findOutputFileDirectory, $replaceOutputFileDirectory)