Republish printers easily on a print server to Active Directory.

Printers can get pruned from the directory for many reasons.  The way it is supposed to work is if the printer is stale then a DC will remove the print queue object from the directory after trying to contact it 3 times at 8 hour intervals (default).  This also means that if a DC can’t…

1

Need an easy way to create a unique file name with the date?

  I needed to dump winlogon and do some checks against the dump file and needed and easy way to get the computername and date in the file name and formatted so I could easily perfrom next steps.  Here was the soution: C:\Debuggers>echo %computername%_%DATE:~10,4%.%DATE:~4,2%.%DATE:~7,2%SK8ORDIE_2007.04.12 Here was the script I was running to do some checks…


Hey I forgot to turn on RDP on my server!

Ever find yourself away from your server after building it out and forgot to turn on RDP so you could TS onto the machine?  Well in XP and 2k3, you can just toggle a reg key and most of the time (pending firewall issues) you can then TS into the box.  Doesn’t work in Windows…

2

Dumping out all the DCs in a domain to a txt file

Short and sweet way of dumping out the DCs to a txt file, in a script:   for /f “skip=1” %%a in (‘netdom query dc /domain:YOURDOMAIN’) do (if %%a == The (echo.) else echo %%a >> test.txt)   So what’s the deal with all the syntax, and how would this be useful?  Well if you do…

2