Discussion:
Old (stale) computers in WSUS
(too old to reply)
David Chadwick
2005-06-15 13:14:36 UTC
Permalink
Hi,

We quite often format machines and I have noticed that WSUS ends up with
multiple entries for the same computer name. WSUS still works fine and the
PCs are updated, but it will start to get messy having multiple entries for
every computer that is formatted multiple times.

Does WSUS ever remove these with internal cleanup routines? Perhaps if a
machine has not been heard from in X days?

I noticed that I can manually remove machines from the Computer list also.
I am curious what this actually does. Lets say I remove a machine that is
actually still on the network. Does WSUS totally purge the record from the
database, and therefore the next time that machine contacts WSUS it will be
created again? Or does removing a machine really just mark the computer
record in the WSUS database to tell WSUS not to deal with that computer ever
again? It's an important distinction.

Thanks in advance.

Regards,
David
Lawrence Garvin
2005-06-15 14:50:04 UTC
Permalink
Removing a machine from the WSUS console will result in the machine being
'recreated' the next time it reports to the WSUS server. Whether it actually
purges the record I cannot say (but an inspection of the tables would
confirm or deny this), but I do know that the entry will be recreated within
24 hours.

Also, there is a script available in the toolkit that can be run against the
database that will purge stale entries. It's date driven, and the parameter
can be selected for as little as one day old.
Post by David Chadwick
Hi,
We quite often format machines and I have noticed that WSUS ends up with
multiple entries for the same computer name. WSUS still works fine and the
PCs are updated, but it will start to get messy having multiple entries for
every computer that is formatted multiple times.
Does WSUS ever remove these with internal cleanup routines? Perhaps if a
machine has not been heard from in X days?
I noticed that I can manually remove machines from the Computer list also.
I am curious what this actually does. Lets say I remove a machine that is
actually still on the network. Does WSUS totally purge the record from the
database, and therefore the next time that machine contacts WSUS it will be
created again? Or does removing a machine really just mark the computer
record in the WSUS database to tell WSUS not to deal with that computer ever
again? It's an important distinction.
Thanks in advance.
Regards,
David
Torgeir Bakken (MVP)
2005-06-15 16:02:26 UTC
Permalink
Post by Lawrence Garvin
Removing a machine from the WSUS console will result in the machine being
'recreated' the next time it reports to the WSUS server. Whether it actually
purges the record I cannot say (but an inspection of the tables would
confirm or deny this), but I do know that the entry will be recreated within
24 hours.
Also, there is a script available in the toolkit that can be run against the
database that will purge stale entries. It's date driven, and the parameter
can be selected for as little as one day old.
Hi,

But it looks like there is a bug in the current version:


Subject: Re: CleanStaleComputers script ignoring /days: ?
From: "Yasufumi Shiraishi [MSFT]" <***@microsoft.com>
Date: Wed, 8 Jun 2005 13:00:43 -0700
Message-ID: <***@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.windows.server.update_services

<quote>
Post by Lawrence Garvin
I'm trying to run the CleanStaleComputers script:-
CLEANSTALECOMPUTERS /DAYS:60 /DELETE:NO /PROMPT:YES
But it says it's going to move a lot of computers that contacted the
WSUS server a week ago, it seems to be ignoring the /DAYS: switch.
Anyone else tried this sucessfully?
It looks like there's a bug in the CleanStaleComputers code. It's
actually looking for computers that haven't contacted the server in the
last x HOURS.

Thanks,
Yasufumi Shiraishi
SDE, Windows Server Update Services
Microsoft

</quote>
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
Yasufumi Shiraishi [MSFT]
2005-06-16 03:35:35 UTC
Permalink
The current sample has a bug, but it can still be used. Just specify the age
in hours when using the /DAYS: option.

For example,
CLEANSTALECOMPUTERS /DAYS:720 /DELETE:NO /PROMPT:YES
will search for computers that haven't contacted the server in 30 days (720
hours).

Thanks,
Yasufumi Shiraishi
SDE, Windows Server Update Services
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Post by Torgeir Bakken (MVP)
Post by Lawrence Garvin
Removing a machine from the WSUS console will result in the machine being
'recreated' the next time it reports to the WSUS server. Whether it
actually purges the record I cannot say (but an inspection of the tables
would confirm or deny this), but I do know that the entry will be
recreated within 24 hours.
Also, there is a script available in the toolkit that can be run against
the database that will purge stale entries. It's date driven, and the
parameter can be selected for as little as one day old.
Hi,
Subject: Re: CleanStaleComputers script ignoring /days: ?
Date: Wed, 8 Jun 2005 13:00:43 -0700
Newsgroups: microsoft.public.windows.server.update_services
<quote>
Post by Lawrence Garvin
I'm trying to run the CleanStaleComputers script:-
CLEANSTALECOMPUTERS /DAYS:60 /DELETE:NO /PROMPT:YES
But it says it's going to move a lot of computers that contacted the
WSUS server a week ago, it seems to be ignoring the /DAYS: switch.
Anyone else tried this sucessfully?
It looks like there's a bug in the CleanStaleComputers code. It's
actually looking for computers that haven't contacted the server in the
last x HOURS.
Thanks,
Yasufumi Shiraishi
SDE, Windows Server Update Services
Microsoft
</quote>
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
http://www.microsoft.com/technet/scriptcenter/default.mspx
Parvinder
2005-06-29 12:08:01 UTC
Permalink
I am new to SQL server. Is there a "how to" document to do this cleanup ?
Where do you run this command ?
Post by Yasufumi Shiraishi [MSFT]
The current sample has a bug, but it can still be used. Just specify the age
in hours when using the /DAYS: option.
For example,
CLEANSTALECOMPUTERS /DAYS:720 /DELETE:NO /PROMPT:YES
will search for computers that haven't contacted the server in 30 days (720
hours).
Thanks,
Yasufumi Shiraishi
SDE, Windows Server Update Services
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
Post by Torgeir Bakken (MVP)
Post by Lawrence Garvin
Removing a machine from the WSUS console will result in the machine being
'recreated' the next time it reports to the WSUS server. Whether it
actually purges the record I cannot say (but an inspection of the tables
would confirm or deny this), but I do know that the entry will be
recreated within 24 hours.
Also, there is a script available in the toolkit that can be run against
the database that will purge stale entries. It's date driven, and the
parameter can be selected for as little as one day old.
Hi,
Subject: Re: CleanStaleComputers script ignoring /days: ?
Date: Wed, 8 Jun 2005 13:00:43 -0700
Newsgroups: microsoft.public.windows.server.update_services
<quote>
Post by Lawrence Garvin
I'm trying to run the CleanStaleComputers script:-
CLEANSTALECOMPUTERS /DAYS:60 /DELETE:NO /PROMPT:YES
But it says it's going to move a lot of computers that contacted the
WSUS server a week ago, it seems to be ignoring the /DAYS: switch.
Anyone else tried this sucessfully?
It looks like there's a bug in the CleanStaleComputers code. It's
actually looking for computers that haven't contacted the server in the
last x HOURS.
Thanks,
Yasufumi Shiraishi
SDE, Windows Server Update Services
Microsoft
</quote>
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
http://www.microsoft.com/technet/scriptcenter/default.mspx
Torgeir Bakken (MVP)
2005-06-29 14:26:40 UTC
Permalink
Post by Parvinder
Post by Yasufumi Shiraishi [MSFT]
The current sample has a bug, but it can still be used. Just
specify the age in hours when using the /DAYS: option.
For example,
CLEANSTALECOMPUTERS /DAYS:720 /DELETE:NO /PROMPT:YES
will search for computers that haven't contacted the server in
30 days (720 hours).
I am new to SQL server. Is there a "how to" document to do this
cleanup ? Where do you run this command ?
Hi,

CLEANSTALECOMPUTERS is in the "Windows Server Update Services API
Samples and Tools" available for download here:

http://www.microsoft.com/windowsserversystem/updateservices/downloads/default.mspx
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
Loading...