Welcome to TechNet Blogs Sign in | Join | Help

Browse by Tags

All Tags » Ghetto scripting   (RSS)
SET-ACL on registry key
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...

Posted Monday, September 29, 2008 4:06 PM by Brad Rutkowski | 1 Comments

Using invoke-command to launch a script on a remote computer which connects to network resources.
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...

Posted Friday, September 26, 2008 8:19 PM by Brad Rutkowski | 1 Comments

Display warning text when someone logs onto your servers
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...

Posted Thursday, September 25, 2008 1:25 AM by Brad Rutkowski | 1 Comments

Getting Access Denied when trying to query root\MSCluster namespace remotely against Windows 2008.
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...

Posted Monday, September 08, 2008 7:00 PM by Brad Rutkowski | 1 Comments

Find out who pings on a subnet quick and easy
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...

Posted Thursday, April 24, 2008 12:57 AM by Brad Rutkowski | 0 Comments

Hey Admins! Gathering information from remote machines using WMI (the easy way).
  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...

Posted Friday, March 14, 2008 10:48 PM by Brad Rutkowski | 0 Comments

Using TypePerf to get performance data on the command prompt.
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...

Posted Saturday, September 22, 2007 9:29 PM by Brad Rutkowski | 4 Comments

Are there pending operations waiting for a reboot?
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...

Posted Wednesday, June 27, 2007 5:21 PM by Brad Rutkowski | 0 Comments

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 Read More...

Posted Monday, June 25, 2007 8:16 PM by Brad Rutkowski | 0 Comments

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% Read More...

Posted Thursday, April 12, 2007 8:46 PM by Brad Rutkowski | 0 Comments

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 Read More...

Posted Wednesday, October 18, 2006 5:07 PM by Brad Rutkowski | 2 Comments

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 Read More...

Posted Tuesday, October 17, 2006 6:47 PM by Brad Rutkowski | 0 Comments

Page view tracker