Forum Discussion
PowerShell Novice: Script Timeout #WSUS
For many years now, WSUS performance has suffered from missing indexes out-of-the-box.
The System Center product group have for a long time now published a guide on how you can add these missing indexes to the WSUS database. Speaking from experience, this advice from the product is a "must do" post installation task as the performance difference is profound.
Here's the documentation where you can find the T-SQL script in step 3:
Cheers,
Lain
I can’t seem to find a way to ensure there is no timeout for this as much of what I’ve read shows a specific time frame and wondered if it was possible.
I’m a complete novice with this so appreciate any feedback
- LainRobertsonMar 23, 2023Silver Contributor
You can't change the script, unfortunately.
The error itself is an SQL error, and you have no capacity for controlling the query timeout.
But by applying the indexes from the above article, you improve SQL performance on the WSUS database quite considerably (for certain functions), which greatly shortens the time it takes to finish, which in turn resolves this error condition.
In other words, you can't tackle this from the client side. You need to address it from the database server side.
Cheers,
Lain
- Taff4EverMar 23, 2023Copper ContributorCool thank you, that makes more sense so rather than a PowerShell approach, SQL is a better way to manage the DB.
Will read through the links you sent
Thank you for your help, much appreciated- LainRobertsonMar 23, 2023Silver Contributor
Just to be clear, you will still use the PowerShell WSUS module.
Running the T-SQL from the System Center article is something you only need to do as a once-off task after installing a new WSUS instance so that the missing indexes are created.
It is not an alternative way to manage WSUS itself. You will continue to use the WSUS PowerShell module for that - just as you are doing now.
Cheers,
Lain