WSUS: T-SQL – Move all computers from Unassigned Computers group into another
Mar 04 2009
When recently almost 1500 new computers reported in our WSUS I thought, damn, must to move them from Unassigned Computers group into suitable groups (notebooks, desktops etc.) for easiest management. Unfortunatelly it is a big pain on ass (we don’t use client targeting option in our environment) because of:
- there is no drag & drop in WSUS console (!)
- if you select a lot of computers manually and choose from menu to move them into another group the WSUS Console MMC often start to freeze :/
So.. I look on this 1500 computers and was really in bad mood because of necessity to spend few hours on manually selection (by Ctrl+click) computers and choosing move command from context menu… H+O+R+R+I+B+L+E ;)
Fortunately we have access to WSUS database, so after short investigation and few tries I wrote SQL code which move all computers (selected by you through computer name pattern) from Unassigned Computers group into group of your choice. After few minutes and few modifications (computer names pattern) the task is done.
I use it on WSUS 3.0 SP1 database. The code is selfexplained I hope. Enter your data in lines with ++++++ Change it to your needs ++++++ comment and run in WSUS database context.
SQL code below.
Read more…


