The Surly Admin

Father, husband, IT Pro, cancer survivor

Using Powershell to get Adapter Information

Had an interesting thread come through on Spiceworks the other day that required some detective work with WMI.  In the past, when I did WMI calls with vbScript I usually had to Google it and find someone else who’d done what I wanted to do and modify their script.  But with Powershell you don’t have to dig through different blogs, or try to slog through the MSDN documentation, now you can just inspect the data and do it directly.  Here’s what I did.

Continue reading

May 20, 2013 Posted by | PowerShell | , , | 2 Comments

New Version: Employee Directory

I keep getting requests “Can I get this field?” or “Can I get that field?” for the Employee Directory script and honestly it wasn’t designed for that.  The header in the table has to be manually changed, and the JavaScript that does the button filtering has to be altered.  Not to mention the reverse engineering that has to occur because I don’t necessarily remember everything I did in the script 6 months ago!  So it was time to sit down with the script and see if there was something I could do about this.  Here’s what I came up with.

Continue reading

May 16, 2013 Posted by | PowerShell | , , | 121 Comments

New Version: Simple Server Status

Had someone at Spiceworks ask a question about a script they were trying to use so I asked them to post the relevant code and, lo and behold, it was my Simple Server Status script!  He was having a problem with authentication because the ID he was running the script under didn’t have rights and he needed to run the script with his domain level credentials.  Never got an answer as to why he couldn’t just run the script with those credentials, but modifying the script to use alternative credentials should be easy enough.  Of course, it never is.

Continue reading

May 7, 2013 Posted by | PowerShell | , , | 4 Comments