Courion Tip – which server did that run on?   Leave a comment

I have more than one server I am responsible for, and, despite my best efforts (and/or during changes) they might not be identical w/r to the workflows. So, it’s pretty handy to keep track of which server it ran on. This is easily tracked by creating a custom macro called %Custom Macro.GetServerName% – this is a VBScript Macro, return type of text, set to:

Dim strServerName
strComputer = “.”
Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2”)
Set colItems = objWMIService.ExecQuery(“Select * from Win32_NetworkAdapterConfiguration WHERE IPEnabled = True”)
For Each objItem in colItems
‘ WScript.Echo”Description: ” & objItem.Description
‘ WScript.Echo “Physical (MAC) address: ” & objItem.MACAddress
‘WScript.Echo “Host name: ” & objItem.DNSHostName
strServerName = objItem.DNSHostName
‘If Not IsNull(objItem.IPAddress) Then
‘ For i = 0 To UBound(objItem.IPAddress)
‘ WScript.Echo “IP address: ” & objItem.IPAddress(i)
‘ Next
‘End If
‘If Not IsNull(objItem.IPSubnet) Then
‘ For i = 0 To UBound(objItem.IPSubnet)
‘ WScript.Echo “Subnet: ” & objItem.IPSubnet(i)
‘ Next
‘End If
Next

NativeScript = strServerName

Now, just add something like this to the end of your notifications and summary screens:

<br>  Server: %Custom Macro.GetServerName% Workflow: %Workflow Name%

Advertisements

Posted August 31, 2009 by mmdmurphy in Courion Tip, tips

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: