Monday, June 30, 2008

Cool Script

I can't script worth a crap and usually scour the web for scripts that do great things. I recently needed to find out which users in our domain had local admin rights on their workstations.

While searching, I came across this script written by Brian Desmond. The script will read your from a text file (that you create..another script) all the pc's in your domain(c:\pclist.txt), test for connectivity and output the data to a log and csv file. It's pretty cool. If you don't want the script to bomb, simply put an "ON ERROR RESUME NEXT" below "Option Explicit". Just be sure to go back and check the devices it missed. You can also edit the file to enumerate Power Users or any other group. Thanks Brian.

'==========================================================================
' NAME: Dump Local Administrators Membership
'
' AUTHOR: Brian Desmond,
' DATE : 4/16/2007
'==========================================================================




Option Explicit

Const LogFile = "LocalAdmins.log"
Const resultFile = "LocalAdministratorsMembership.csv"
Const inputFile = "C:\PClist.txt"


Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")

Dim shl
Set shl = WScript.CreateObject("WScript.Shell")

Dim fil
Set fil = fso.OpenTextFile(inputFile)

Dim results
Set results = fso.CreateTextFile(resultFile, True)

WriteToLog "Beginning Pass of " & inputFile & " at " & Now()
WScript.Echo "Beginning Pass of " & inputFile & " at " & Now()
'On Error Resume Next

Dim grp
Dim line
Dim exec
Dim pingResults
Dim member

While Not fil.AtEndOfStream
line = fil.ReadLine

Set exec = shl.Exec("ping -n 2 -w 1000 " & line)
pingResults = LCase(exec.StdOut.ReadAll)

If InStr(pingResults, "reply from") Then
WriteToLog line & " responded to ping"


'On Error Resume Next

Set grp = GetObject("WinNT://" & line & "/Administrators")


results.WriteLine line & ",Administrators,"

For Each member In grp.Members

WriteToLog line & ": Administrators - " & member.Name
results.WriteLine ",," & member.Name
Next
Else
WriteToLog line & " did not respond to ping"

End If
Wend

results.Close

Sub WriteToLog(LogData)
On Error Resume Next

Dim fil
'8 = ForAppending
Set fil = fso.OpenTextFile(LogFile, 8, True)

fil.WriteLine(LogData)

fil.Close
Set fil = Nothing
End Sub

Group Policy

I recently have been victim to this error in the Application Event Log on some of my Windows XP machines.


Event Type: Error
Event Source: Userenv
Event Category: None
Event ID: 1053
Date: 6/30/2008
Time: 8:29:27 AM
User: NT AUTHORITY\SYSTEM
Computer: XXXXXXXXXX
Description:
Windows cannot determine the user or computer name. (A socket operation was attempted to an unreachable host. ). Group Policy processing aborted.


Well, I've found that most people point to DNS problems. BUT, I have found some good info on BroadCom NIC's regarding media sensing that can cause these types of problems. Read here to find out more. It's FAQ 101. Additionally you can read this tidbit of info from Microsoft and how to fix it.

These type of errors are frustrating..users complain of drives not mapping, scripts not running..ugh... The registry changed supplied in the last link worked for me. I hope it does the same for you.

Thanx. C

Thursday, June 26, 2008

Jones Soda Pic



If you have a second to spare..please vote for this pic. It's a nominee for the cover of a bottle of Jones Soda. Excellent drink.

Wednesday, June 25, 2008

Vista Install

I took the plunge and installed Vista Business on my Dell Latitude D830 laptop. After getting home from Tech Ed I had a bit more faith in Vista so I thought I would give it a shot. So far so good. I'm not running anything out of the ordinary that would pose any significant issues - I think.

I did have to upgrade my Sonic Wall VPN device to the latest firmware and install the latest NetXtender client. All is well with that. A few other apps I have are Office Pro 2007, some networking utilities...etc..

The interface is pretty cool. If you thought XP was bubbly, Vista is more animated. Kinda looks like Linux...don't mean to offend anyone.

Installation was fairly a breeze. I had some problems burning the ISO to my DVD drive but I believe that was due to antivirus running. I went through several DVD's and installation retry's...I finally decided to download another ISO from Microsoft. Either the first ISO was bad or antivirus was the culprit.

Once installed, I ran Windows Updates. The ISO was a Vista SP1 image. the updates were mostly security updates and drivers - Video and NIC.

The interface is going to take a little to get use to...it has only been a day or so but I'm learning as I go. example: there is no Run, and I had to read the help doc to join a domain if that tells you anything.

Thursday, June 19, 2008

Mr. Tambourine Man

It was well put the other night. A guy in front of me said, "When Eddie speaks, the wind blows".
My wife thinks were all freaks...Eddie worshipers. I think she's lost her marbles.

Pearl Jam put on a great show on Tuesday in VA Beach. Thanks 10C for my excellent tickets. To highlight a few things...

- "Long Road" was a great opener and set the tone for the evening.
- The moon looked full and provided excellent lighting.
- "All Night" was played.
- "Guaranteed" - Ed wrote for the Into The Wild movie.
- Eddie defying gravity - lucky catch Ed.

Here is the setlist.

I thought about which job I'd enjoy if I was guy on the crew. It's got to be the guy that throws the tambourines to Ed - typically during Rockin in the Free World. He goes through a number of them and Ed hands them out to the crowd. They are being thrown at Ed from all angles and he manages to catch them all. Thats the job I want, if just for a night.

Much thanks to PJ for a great night. You have a great crew. Looking forward to NJ tonight and DC on Sunday.

Sunday, June 15, 2008

Back from Tech-Ed

I just got back from Microsoft Tech-Ed a few days ago. It was a good conference and was held in Orlando. The second of two separate events. The developers conference was held the week before.

Microsoft always puts on a good show. I suppose anyone who can rent out Universal Studios for the night should be able to put on a good conference. The sessions were great and so were the hands-on labs. Some new technologies that I'm excited about is NAP, and the new features of IIS 7.

What I got out of the "keynote" is Microsoft's placing driving effort to make their software/code available and interoperable with open standards - allowing Linux to work directly with Microsoft technologies and vice-versa. They are also pushing virtualization with their new "hyper-v" technology at the desktop and server layers. With the new acquisition of Kidaro it seems they can now fix Vista's compatibility problems with 3rd party software by virtualizing the application (which they demonstrated).

They also offered certification testing, cram sessions...It was rumored that someone took 13+ tests and passed..

Many vendors displaying new technologies were also in attendance. The big guns like EMC, HP, Dell, VMware..in addition to other companies like Strangeloop, Proofpoint, Global Knowledge, 2X, Network Automation, ScriptLogic, and ASG. The big list is available here. Sherpa Software - who provides Microsoft Exchange products aimed at Archiving, PST management for SMB's is definitely one I'll be checking out. Also, MailFoundry, who provides anti-spam, anti-virus and phishing protection is taking a whole new approach to protecting your email environment.

Anyhow...back to work tomorrow...have a good week.