Skip to Content

Nerdin' Out

A Weekend Ramble

Well, it's Thanksgiving Weekend in Canada.  That typically means turkey, food, and more turkey and food.  For the kids, it'll really mean a lot of people around, some appies as dinner, followed by dessert then bed. 

How I'd love to be 4 again.

A few items caught my eye this week:

Moving a computer object in powershell

Nerdin' out, sorry …

As part of our Windows 7 deployment, we need to move the computer object from the default "Computers" OU to the OU where the the object will live and get it's software installation list from.

So, a wee bit of googling later, I found an article at http://dverweij.spaces.live.com/blog/cns!A3C75816DA1731F8!115.entry

Adapted for my own use, I get something like:

function MoveComputerOU($targetOU)
{
    $ComputerName = $env:COMPUTERNAME
    $ad1=[adsi]''
    # Setup the search criteria
    $ad1search = new-object directoryservices.directorysearcher
    $ad1search.searchroot = $ad1
    $ad1search.filter="(objectclass=computer)"
    $serv2 = $ad1search.findall()|where {$_.properties.item("cn") -like $ComputerName}

    # Get the DN of the object
    $ComputerDN = $serv2.properties.item("distinguishedname")
    Write-Host "Found the DN at $ComputerDN"
    # Connect to the computerobject
    $serv = [adsi]"LDAP://$ComputerDN"

    # Specify the target OU
    $targetOU="LDAP://$targetOU"
    Write-Host "Moving to $targetOU"
    # Move the object to the target OU
    $serv.psbase.MoveTo($targetOU)
}

Basically - we find the computer object in the directory, connect to it, then move it.  Pretty simple.  Not much in the way of error checking, but this is generally done by IT staff, so we can afford to be a bit lazy...

However, your mileage may vary.  It wouldn't be too hard to put some checks and balances in.

Nom nom, Cookies.

image

These are cookies.  They taste good.  They usually have chocolate chips, sometimes raisins, sometimes other tasty stuff.  Usually they also have a lot of fat, sugar, calories and other stuff that make inactive people like me get fat.

image

This is also a cookie, as seen by Firefox.  This cookie is for a local website I am working on, called "PC Pump". This particular cookie helps the website remember who you are when you look at it.  Maybe you read some posts on the forum, and when you come back the website tells you "Hey, these posts are new since your last visit".  Or maybe you logged in, and you filled out a survey, and I need to try to make sure you won't fill out the survey twice.

Now, I know as a wanna-be web developer guy, I need to be making my stuff to work with the lowest common denominator - should work without flash, java, video, etc etc.  But cookies?  Come on.  Cookies are set by websites that don't even need you to log in or anything.  They are not malicious, when used correctly.  They are a critical tool for interactive web based tools.

So turn on your damn cookies.

Giving Chrome a good tire kick

Sorry, Chris

image

Effing Wireless

See this?

image

This is a Linksys WRT54G wireless router.  You probably have something like this in your home…  Maybe not Linksys, maybe it's DLINK or Netgear or whoever.  The point is, you have something like this device in your home.  For it's size, it's reasonably complex; It'll manage multiple connections from inside your home (we'll call this the private network) from wired and wireless connection, and them go out and get stuff off the internet.  It manages assigning addresses and name resolution and all sorts of stuff for you, so that you don't need to.

The problem with this device?  It sucks.

Telus and the Internet Stick

image All the cellular carriers have these "Internet Sticks", which means nothing more than a EVDO/3G modem (depending on who you happen to have sold your soul to for your 3 years).

So, yeah, Telus sells us this Sierra Wireless 598 USB modem.  Works pretty well - performance is "OK", dipping down towards "Marginal" depending on where you are, how much network congestion there is, and so on.

Today, however, we get a brand new problem with it.  It will drop connection after 20 seconds.  Reliably drop connection after 20 seconds.  But only if the local network adapter is connected.

In this case, the computer was attached to a few NI components via TCP/IP, which depended on the network adapter to be working (for obvious reasons!)

Reboot the computer, and the connection holds - until you launch the NI software to acquire data from the peripherals.  Then the network drops again.

The Future is Friendly

image

Is it really friendly Telus?  Because when I go to your completely crap tool to get MMS messages, this is what I see.

Once again, I’m totally thrilled by the awesome website they provide their users.  I ran into this when Chris sent me a picture of Martin…

Busy weekend of doing nothing

In another suitably busy weekend, Holly and I find ourselves tending to a large list of unanswered Facebook requests, Google Reader items, and a depleting supply of Haagen-Dazs “Half the Fat” Dulce De Leche ice cream, we can’t help but reflect on the massacre that the weekend was.

Which doesn’t mean it was bad, per ce – it’s just full.  And for being the last few weeks of summer I guess they ought to be full, but not THIS full that I’m wondering how to fit in some sleep in the next 5 hours before showering and going to work for a week.  At least, it’s a short week, in a manner of speaking.

It all started so nicely...

While the day started out all pretty like (yes, I know it’s hard to tell from the picture…  the camera on the BB Storm isn’t known for it’s quality), the drive was quiet and uneventful. A simple PC upgrade, some user documentation, a drawn-out discussion about pages in Facebook and what to put on it for the company made the day wander on by in the way that you might expect any other Thursday to peel by. Then, around 1:00 PM I got a notice indicating the website was down.  This happens occasionally, as MySQL somehow goes away.  Curious, I went to look, and the server was actually not responding, not just a MySQL error.  I had applied some updates to the server earlier that morning as part of routine maintenance, but hadn’t seen any issues up until today. Remote to the computer, and we connect just fine.  Even more curious, I refresh the page.  loads up!  Thinking it was a “bug”, I went to log off the server, only to discover it wasn’t responding.  Switch to the performance tab in ESXi, and note that there’s no spike in CPU, RAM, disk..  or any activity, really. This is just a bit odd, so I scope out the rest of the host, and find it’s generally under-utilized.  This is good, since I think it’s oversubscribed (one of the awesome things about ESX).  Then, the VI client stops responding intermittently.  So now I poke my head around the other VMs that are on the same host, and find the same issue. Hmm.

Huh.

I’ve never noticed this in Google Reader until today.

Syndicate content