samersultan / wsus-cleanup

PowerShell Script for cleaning up WSUS
41 stars 20 forks source link

Error rebuilding db against local SQLServer. #8

Open yamauchikazu opened 3 years ago

yamauchikazu commented 3 years ago

Workaround.

function RebuildDBIndexes {} in WSUS-cleanup.ps1

before: $status = SQLCMD -S \.\pipe\Microsoft##WID\tsql\query -i $SQLPath -I

after: if ( $script:SqlServer -match "microsoft##" ){ $status = SQLCMD -S \.\pipe\Microsoft##WID\tsql\query -i $SQLPath -I } else { $status = SQLCMD -S $script:SqlServer -i $SQLPath -I }