Closed zjorz closed 1 year ago
FILE: C:\Program Files\WindowsPowerShell\Modules\AADInternals\0.9.1\AADSyncSettings.ps1
Added the bold part (Integrated Security=true;) and it worked like a charm! 😊
function Get-AADConfigDbConnection { [cmdletbinding()] Param() Begin {
$parametersPath = "HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters" $dBServer = (Get-ItemProperty -Path $parametersPath).Server $dBName = (Get-ItemProperty -Path $parametersPath).DBName $dBInstance = (Get-ItemProperty -Path $parametersPath).SQLInstance $connectionString = "Data Source=$dbServer\$dBInstance;**Integrated Security=true;**Initial Catalog=$dBName" } Process { Write-Verbose "ConnectionString=$connectionString" return $connectionString }
} Now BOTH Get-AADIntSyncCredentials and Get-AADIntSyncCredentials -AsBackgroundProcess $false -Verbose work
Added to v0.9.2. If server is not "(localdb)", "Integrated Security=true;" is appended to connection string. Please test to see does it work.
FILE: C:\Program Files\WindowsPowerShell\Modules\AADInternals\0.9.1\AADSyncSettings.ps1
Added the bold part (Integrated Security=true;) and it worked like a charm! 😊
function Get-AADConfigDbConnection { [cmdletbinding()] Param() Begin {
Create the connection string for the configuration database
} Now BOTH Get-AADIntSyncCredentials and Get-AADIntSyncCredentials -AsBackgroundProcess $false -Verbose work