Back few month ago, i was write simple script to scanning possibly “death” machine in Active Directory. Now i would like to share with you another similar script to scanning “zombie” user’s account. In my own words, Zombie account is an account which still exist – either enabled or disabled – in Active directory while the actual user is no longer exist in organization. The zombie account could associate to user account or service account. The present of zombie account in the system, could lead to serious security issue and IT administrator should not underestimate on outcome risk might cause of it.
Scripting
Recently, i was notice that numbers of computers inside of Computer OU in Active Directory larger than the actual “running” machine in the network. I believe, it’s happen because those computers – that no longer exist in the domain or network – was not deleted from Active Directory properly. The advantages of this situation are no one have idea which computer that no longer exist or removed from the network permanently. Scanning all those machines with ping test will not help either, because some of machine probably on remote location which disconnected temporary from the network. And don’t tell me to manually check it, one-by-one!
01: strComputer="."
02: Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
03: Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Product WHERE caption LIKE '%Adobe%'",,48)
04: For Each objItem in colItems
05: wscript.echo objItem.Name & " -> " & objItem.Version
06: Next
Jawabannya ada di http://msdn.microsoft.com/en-us/library/aa392263(VS.85).aspx. Like Operator pada WQL tidak tersedia untuk sistem operasi Windows 2000 dan Windows NT.
REFERENCES
MSDN: Like Operator (Windows)
Melanjuti tulisan sebelumnya, berikut adalah WSH Script yang gw gunakan buat nge-”dump” database dari ISA Log yang menggunakan MSDE ke lokasi repository yang untuk selanjutnya di import kedalam Microsoft SQL Server dan dimanipulasi hingga menghasilkan report yang diinginkan. Script ini juga memanfaatkan BLAT untuk mengirimkan log yang dihasilkan melalui email. Format dari log yang ditampilkan masih jauh dari sempurna, namun setidaknya -bagi gw- dapat memberikan gambaran rinci dari setiap operasi terhadap file yang dilakukan.
Script ini merupakan modifikasi dari artikel Removing Old MSDE Log Databases yang di publish di technet. Untuk menghindari besarnya jumlah data yang dicopy dan jumlah traffic data yang dihasilkan, karena lokasi repository berada di server lain, maka script ini di schedule untuk running setiap hari pada jam 2 pagi dan akan men-detach database-database yang berusia lebih dari satu hari.
Script ini dapat diunduh disini. Jika ada rekomendasi dan perbaikan, silahkan menghubungi gw. Semoga bermanfaat!.
REFERENCES
TECHNET: Removing Old MSDE Databases
OBJECTIVE
Melakukan operasi file copy dari sebuah source folder ke target folder. Operasi ini *hanya boleh* terjadi jika file-file yang akan di copy tidak ada (exist) di target folder, sehingga tidak ada overwrite terhadap suatu file di target folder.
Continue reading…

