Monthly Archives: March 2009

But it is not clear what the rights are to what is posted there. Nifty idea but I would prefer to keep code local. For the simple fact I would prefer a reference by anyone who might use any of what I post.

viewed with WordPress tags, my code would look as such:
When I put it in it has all indentations proper.

Function MachineUp (strComputer)

Dim objPing
Dim objStatus

Set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}")._
ExecQuery("select * from Win32_PingStatus where address = '"_
& strComputer & "'")
For Each objStatus in objPing
If IsNull(objStatus.StatusCode) or objStatus.StatusCode <> 0 Then
MachineUp = False
Else
MachineUp = True
Exit For
End If
Next
End Function

This works but the intention is to be helpful, not sloppy.

And so I will search on hopeful of a simple plug-in that will help.

Edit – After playing with it some more I have the indentation but it is still not clean…

Code Post One

I have been wanting to post up code for a while to give back to the internet community. Snippets and ideas are taken from what I find on the net and incorporated – though not always referenced as such. Hopefully someone will find the VBScript (etc) code useful. I hold no responsibility for what they do, nor for the maintenance or availability. If anyone wants to post a comment or question I will do my best within my time constraints to help resolve issues.

There is always room for revision in code and I am definitely not testing against multiple environments. For the most part I will be posting VBScript that I have created that is helpful… occasionally you may find Powershell or something else. Also of note, I may well post unfinished projects for commentary or ideas – as example, I spent time several years ago automating server documentation based of AD machine accounts and OU’s with Word templates… probably about 85% done and wont’ be complete untill there is a calling for it. I think it a nifty solution, but it has to havea need and a fit to my current environment to get my attention.