Browse by Tags
All Tags »
Ghetto scripting (RSS)
Man it was hard to find info on using set-acl on a registry key! I was looking for a way to set an ACL that once set would be inherited by child keys and values. We needed to give “Local Service” full control on the registry
Read More...
First, I found the details here . Second, things can change as this is being done with the CTP for Powershell 2.0 Third, if you don’t know about remoting in 2.0 watch this 5 minute video . Then read this . Whew. Backstory: You might find yourself in a
Read More...
This works for Windows 2003 and Windows 2008. We use it during our reliability study to let the server owners know that they shouldn't reboot their boxes without a good reason. You can use it for whatever you’d like. :) The two keys to set: reg add "
Read More...
Ran into a weird issue where I was getting access denied when trying to query nodes remotely in powershell. The query was working fine against Windows 2003 cluster names and worked locally when ran on a Windows 2008 cluster node, it just didn’t
Read More...
So i know there are tools out there to do this but figured some would be interested on how to do this real quick with stuff that's already in the OS. 1) Turn off echos to make the out put clean (don’t forget to turn it back on when its done via
Read More...
Those who are just getting into scripting might be wondering how to query info from remote machines using WMI and how to find useful information to query. When I started out trying to learn some of the WMI syntax and gathering info,
Read More...
I was tracking a high CPU issue this week and needed to know when one of my servers was pegged so I could investigate. I could of used perfmon I guess but I really like to do everything I can from the command prompt. I always like it when there is a tool
Read More...
Sometimes you might log onto a server and wonder if there have been patches installed and thing needs to be rebooted. Well if the patch wanted to replace a file that was in use by the system (like NTFS for example) then it populates a certain key in the
Read More...
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
Read More...
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%
Read More...
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
Read More...
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
Read More...