OverviewHow far along are you in your deprecation of XP? We refreshed nearly 5000 XP systems (even some x64 Edition) during 2013 and have a couple dozen or so still in use along with ~ six Vista systems. Most are tied to lab equipment with no network needs. With that said though, I did not want XP to sneak back in so I asked Cory Becht to develop a script to notify when a new XP system joins the domain. If a new XP system is found, it emails myself and the Global IT leads so they can run down why its around for whatever reason and develop a plan to refresh it to Windows 7.
The email gives some basic info from AD to hopefully give you clues on its whereabouts. It will additionally attempt to do a lookup from DNS to also help track it down.
Computer LAP1Q2W3E4 running Windows XP Professional is new and is found at: my.domain.local/NorthAmerica/US/Laptops/LAP1Q2W3E4 IP Address: 10.10.10.102 AD Site: US
Simply run as a scheduled task as the SYSTEM account. Be sure to run with 32-Bit cscript if your using a 64-Bit OS. Just update the first several lines for your environment as shown below. We run it once a day.
2: strEmails = "[email protected];[email protected]" 'separate with semi-colon 3: strSMTPServer = "smtpsmarthost.my.domain.local" 5: strDomainLDAP = "dc=my,dc=domain,dc=local" 6: strDomainFQDN = "my.domain.local" 7: strSMTPDomain = "my.domain.local" 'if the from address domain is different
Theres an Access Database (XP.mdb) that's used to keep track of found systems for performance. Additionally you can modify line 17 for other operating systems. I have one looking for Windows 8 systems.
DownloadThis script is provided as-is, no warranty is provided or implied.The author is NOT responsible for any damages or data loss that may occur through the use of this script. Always test, test, test before rolling anything into a production environment.
You can download it from here.
BonusWe also modified an older version to notify on Servers joining the domain. With thousands of servers we have had cases where a server was not added to backup cycles or some other mishap. This script emails the server support teams so they can setup backup schedules or whatever is needed. Even have used it to catch some systems as having the wrong edition or version of Windows Server.
Server MDT01 running Windows Server 2012 R2 Standard is new and is found at: my.domain.local/Computers/MDT01
That script can also be found above. You will have to modify the same parts as above for your environment.