When i try to run the command "Optimize-WsusServer.ps1 -OptimizeDatabase" i get the following error messages:
Creating custom indexes in WSUS index if they don't already exist. This will speed up future database optimizations.
Invoke-Sqlcmd : The instance of SQL Server you attempted to connect to does not support encryption.
At C:\Div\Optimize-WsusServer.ps1:440 char:5
-
Invoke-Sqlcmd -query $createCustomIndexesSQLQuery -ServerInstance ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [Invoke-Sqlcmd], SqlException
- FullyQualifiedErrorId : SqlExceptionError,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand
Invoke-Sqlcmd : Incorrect syntax was encountered while parsing 'IF 0 = (SELECT COUNT(*) as index_count'.
At C:\Div\Optimize-WsusServer.ps1:440 char:5
-
Invoke-Sqlcmd -query $createCustomIndexesSQLQuery -ServerInstance ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : ParserError: (:) [Invoke-Sqlcmd], BatchParserException
- FullyQualifiedErrorId : ExecutionFailureException,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand
Running WSUS SQL database maintenence script. This can take an extremely long time on the first run.
Invoke-Sqlcmd : The instance of SQL Server you attempted to connect to does not support encryption.
At C:\Div\Optimize-WsusServer.ps1:444 char:5
-
Invoke-Sqlcmd -query $wsusDBMaintenanceSQLQuery -ServerInstance $ ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [Invoke-Sqlcmd], SqlException
- FullyQualifiedErrorId : SqlExceptionError,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand
Invoke-Sqlcmd : Incorrect syntax was encountered while parsing 'SET NOCOUNT ON;'.
At C:\Div\Optimize-WsusServer.ps1:444 char:5
-
Invoke-Sqlcmd -query $wsusDBMaintenanceSQLQuery -ServerInstance $ ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : ParserError: (:) [Invoke-Sqlcmd], BatchParserException
- FullyQualifiedErrorId : ExecutionFailureException,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand
Anyone know how this can be fixed? Thanks!
When i try to run the command "Optimize-WsusServer.ps1 -OptimizeDatabase" i get the following error messages:
Creating custom indexes in WSUS index if they don't already exist. This will speed up future database optimizations.
Invoke-Sqlcmd : The instance of SQL Server you attempted to connect to does not support encryption.
At C:\Div\Optimize-WsusServer.ps1:440 char:5
Invoke-Sqlcmd : Incorrect syntax was encountered while parsing 'IF 0 = (SELECT COUNT(*) as index_count'.
At C:\Div\Optimize-WsusServer.ps1:440 char:5
Running WSUS SQL database maintenence script. This can take an extremely long time on the first run.
Invoke-Sqlcmd : The instance of SQL Server you attempted to connect to does not support encryption.
At C:\Div\Optimize-WsusServer.ps1:444 char:5
Invoke-Sqlcmd : Incorrect syntax was encountered while parsing 'SET NOCOUNT ON;'.
At C:\Div\Optimize-WsusServer.ps1:444 char:5
Anyone know how this can be fixed? Thanks!