- Feb 24, 2010 by the_angry_angel
- Geek, Windows, Daily HTF and System Administration
Mark Baggett over at PauldotCom put together an interesting article on running a command on every machine in your domain from the command line. I genuinely hadn't considered tying dsquery and wmi together in this way. The best thing is that with a little tweaking you can easily run the same command against a subset of your domain. For instance, say you had X terminal/web/sql servers that all lived in the same OU - just dsquery against that and you're laughing.
If you're looking after any more than a handful of servers, without something like SMS/MOM/something you've rolled yourself, then this is a real time saver.
- Jan 20, 2010 by the_angry_angel
- Geek, Unix-like and Daily HTF
I've been playing with Micromiser for a few days, and wanted to graph what it claims to be saving on one of the servers. Luckily this is pretty easy with Munin (which is already running on the box), since Micromiser logs into syslog occasionally. Below is the plugin I hacked together that looks at syslog and uses sed to extract the percentage saving. It's not pretty, but it does work.
Perhaps this'll save you a few minutes.
#!/bin/sh
# Plugin to graph the savings made by micromiser
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
if [ "$1" = "config" ]; then
echo 'graph_title Micromiser Savings (percentage)'
echo 'graph_args --upper-limit 100 -l 0'
echo 'graph_vlabel savings'
echo 'graph_category system'
echo 'savings.label savings'
echo 'savings.draw AREA'
echo 'savings.min 0'
exit 0
fi
RES=`grep Estimated /var/log/syslog | tail -1 | sed 's/.*(\([0-9\.]*\)%)$/\1/'`
echo -n "savings.value $RES"
- Nov 12, 2009 by the_angry_angel
- Geek, Work and Daily HTF
I was flicking through todays NANOG mails, and came across a thread on layer 2 vs layer 3 to the top of the rack. Linked in one of the messages was Dani Roisman's presentation on redundancy models, from June of this year.
It's got some pretty interesting topologies that I wouldn't have considered and comes with a fairly comprehensive run down of pros and cons for each, so it might be worth a read. If you're into that sort of thing.
- Aug 03, 2009 by the_angry_angel
- Geek, Windows, Work and Daily HTF
I've written about specifying drivers for redirected printers in the past, but it's not something I've had to do for a few months.
Last week we had to get a 1500 series HP PSC working on a home workers terminal server session, and it turns out that the "proper" driver isn't correct and doesn't install. Luckily it seems that a lot of the HP PSC's use the same internals as the HP Deskjet series. As most of the Deskjet series work with the Deskjet 550C driver we tried the 550C for the HP PSC 1500, and it works like a dream.
Just thought the world might be interesting in knowing.
- Feb 24, 2009 by the_angry_angel
- Geek, Windows, Work and Daily HTF
I've got a bit of a love-hate relationship with Powershell, but in this case it's turned into a bit of love. Importing users with Powershell is relatively easy to do when combined with ActiveRoles Management Shell for Active Directory, from Quest, which adds a handful of rather useful functions. PSCX supposedly has something similar, but I'm obviously missing them completely.
- Get someone to provide a spreadsheet with all users that they want for their new install (or export from an existing AD using CSVDE)
- Fiddle with the file, remove any crap you don't want, add anything you might, and convert to a CSV. For a new install we tend to set the inital password to something based around the user's name (which you can automate creating with an Excel formula). My finished format is something like this:
givenname,middlename,surname,company,displayname,samaccountname,password - Install Quest's ARM, and fire up the shell that it adds in your start menu
- Now it's simply a case of running the following, replacing my.domain/Path/To/OU/Users with your actual domain and the path to where you want the users placed (you can, obviously, make this part of the CSV, if you want)
import-csv C:\Path\To\Users.csv | foreach-object {
New-QADUser -FirstName $_.givenname `
-LastName $_.surname `
-SamAccountName $_.samaccountname `
-ParentContainer my.domain/Path/To/OU/Users `
-displayname $_.displayname `
-name $_.displayname `
| `
Set-QADUser -UserPassword $_.password | Enable-QADUser
}
- Grab yourself a cuppa, or a beer, and tell the boss that you've been slaving all night (optional, of course)
Just to add an SBS 2008 twist to it, if you create your users in this manner you'll find that they show up in Active Directory Users and Computers, but not the SBS Console. The reason for this a special attribute on the object which doesn't get set. There's a nice article over at the SBS Blog which explains it for groups, but it's also applicable for users.
What it doesn't tell you is that for users, you can simply head into the SBS Console > Users, run the Change User Role for Accounts wizard, select Standard User, select your users (you'll need to select the checkbox to show all users), and then let it do it's magic. It'll setup your users Exchange mailboxes and shared folders in a jiffy.