Enter Search Query:

Show up-to-date server info on the desktop background of all your servers

If you’re a sysadmin like me, you’ll have multiple RDP sessions to multiple servers open a the same time on occasion. They tend to look alike if you keep things standardized and this can introduce the risk of human error when it comes to maintenance. If all RDP sessions look the same, it can be easy to restart the wrong service on the wrong server. To avoid this, I’ve used BgInfo for years. It’s free to download and was designed to gather system information and displays it on the desktop background of a Windows server or workstation. It can be a helpful resource when remotely administering multiple servers. The software is an oldie but a goodie and in this tutorial, I’ll be walking through the process of creating a Group Policy Object which pushes the BgInfo executable and settings file to all servers or workstations in an Organizational Unit.

Group Policy Details:

[download] the zip of BGinfo and all files showcased in this tutorial.

Rem Get each adaptor from the table
For Each objItem In colItems
Rem Get each IP address for the addaptor
For Each strIPAddress In objItem.IPAddress
Rem check to see if it is an IPv6 address and whether we want it
If InStr(strIPAddress, “::”) = 0 Or blnShowIPv6 Then
Rem Set up the correct adaptor name by stringing the first 12 characters and also the MAC address
strCaption = fnSubstring(objItem.Caption, 12, 1024) & ” (” & objItem.MACAddress & “)”
Rem Format DHCP info if required
If objItem.DHCPEnabled and blnShowDHCP Then
strDHCP = ” (DHCP”
If blnShowDHCPExpire Then
strDHCP = strDHCP & ” – Expires: ” & fnDisplayDate(objItem.DHCPLeaseExpires) & “; Server: ” & objItem.DHCPServer
End If
strDHCP = strDHCP & “)”
Else
strDHCP = “”
End If
Rem Print information
Rem Note that any other object from Win32_NetworkAdapterConfiguration can be added here
Call fnDisplayValue(blnShowCaption,strCaption,”Adaptor”,1)
Call fnDisplayValue(blnShowIPAddress,strIPAddress + strDHCP,”IP Address”,1)
Call fnDisplayValue(blnShowGateway,objItem.DefaultIPGateway,”Gateway”,1)
Call fnDisplayValue(blnShowSubnet,objItem.IPSubnet(0),”Subnet”,2)
Call fnDisplayValue(blnShowDNSDomain,objItem.DNSDomain,”Domain”,1)
Echo “”
End If
Next
Next

Rem print the end of script message
Echo strMessage

Rem End of Programme

Rem Procedures & Functions

Rem Display a passed value
Rem The parameters are:
Rem p_valueLogical – should this value be displayed ?
Rem p_valueVar – the value to display
Rem p_valueDisplay – the text to Display
Rem p_valueTab – the number of tabs needed to align it

If p_valueLogical Then
Rem if the value is an array the cycle through each value
If IsArray(p_valueVar) Then
For Each strVar In p_valueVar
Rem if the value is a string then display it, otherwise ignore it
If VarType(strVar) = 8 Then
Echo p_valueDisplay & “:” & String(p_valueTab,” “) & strVar
End If
Next
Else
strVar = p_valueVar
Rem if the value is a string then display it, otherwise ignore it
If VarType(strVar) = 8 Then
Echo p_valueDisplay & “:” & String(p_valueTab,” “) & strVar
End If
End If
End If

Loving the work you’ve done on this, it is helping me out very much on a project we are looking into, which is to start deploying BGInfo across to our desktop clients (rather than on servers). Please bear in mind that I’m currently studying for my 70-410 Installing and Configuring Server 2012, to then proceed to the Administration exams and onwards, so my technical knowledge is limited (have worked with the systems previously so have some knowledge on the subjects). Because of your work on the group policy side of things, this is enabling me to do so, however I am absolutely clueless when it comes to VBS coding.

From previously code work, I get the gist of what is being done, however I would ask if I need to do anything other than remove/add the various bits, which I want to show on the client side after GP has been applied, under Configuration Declarations, and then edit the values Rem Configuration Values?

Any help is most appreciated, however I understand you’re probably a busy man and this could take up just a little bit too much time for you to assist with! If you can help at all, that would be amazing. I’m more than happy to get a simple push in the right direction, as any help is better than none.

The use of the network.vbs script by bginfo.exe has been deprecated for a while. The new version of bginfo is just a single executable and the network.vbs file is no longer needed to obtain system and network information to display on the background. If you want, you can edit the vbs file, but it’ll just control what fields in the older version of bginfo will have data. To actually display that info on the background, you’ll want to use the .bgi settings file you call when launching bginfo. So in conclusion the way the old bginfo worked is:

1. BGinfo uses network.vbs to obtain the info it can retrieve about the system and environment, it then stores that info in memory.
2. BGinfo uses the settings.bgi file to display any subset of the information it retrieved via network.vbs on the system desktop.

With the new version of BGinfo, the bginfo.exe no longer relies on network.vbs and retrieves information itself.