Apr 7 2009 4:23PM GMT
Posted by: Jerry Lees
bginfo,
VBScript,
VBScript Functions,
Systems Administration,
systems management,
Systems administrator tools,
systems reporting
I recently had to provide the information displayed with BGINFO on a number of systems. Unfortunately, BGInfo only generates a bitmap, so far as I know, so I decided to write a script to generate the information and use this displayed information to send back to the person who requested it.
The function below is a part of the script I mentioned. It retrieves and returns text that represents the operating system and service pack information installed on a system.
You can view all the scripts in this BGINFO series here.
Here is the code:
Function GetOSVersion(strComputer)
Dim colItems, objItem, address
Dim StrQuery
Dim objWMIService
GetOSVersion = VbCrLfStrQuery = “SELECT * FROM Win32_OperatingSystem”
Set objWMIService = GetObject(”winmgmts:\\” & strComputer & “\root\CIMV2″)
Set colItems = objWMIService.ExecQuery(strQuery,,48)
For Each objItem in colItems
GetOSVersion = GetOSVersion & vbTab & replace(objItem.caption,”(R)”,””) & VbCrLf
GetOSVersion = GetOSVersion & vbTab & “Service Pack ” & objitem.ServicePackMajorVersion & VbCrLf
Next
End Function
Apr 2 2009 1:23PM GMT
Posted by: Jerry Lees
bginfo,
VBScript,
VBScript Functions,
Systems Administration,
systems management,
Systems administrator tools,
systems reporting
I recently had to provide the information displayed with BGINFO on a number of systems. Unfortunately, BGInfo only generates a bitmap, so far as I know, so I decided to write a script to generate the information and use this displayed information to send back to the person who requested it.
The function below is a part of the script I mentioned. It retrieves and returns text that represents the total page file space allocated in a system.
You can view all the scripts in this BGINFO series here.
Here is the code:
Function GetPageFile(strComputer)
Dim colItems, objItem, address
Dim StrQuery
Dim objWMIService
GetPageFile = VbCrLfStrQuery = “SELECT * FROM Win32_PageFile”
Set objWMIService = GetObject(”winmgmts:\\” & strComputer & “\root\CIMV2″)
Set colItems = objWMIService.ExecQuery(strQuery,,48)
For Each objItem in colItems
GetPageFile = GetPageFile & vbTab & ((objItem.filesize/1024)/1024) & ” Mb” & vbcrlf
Next
End Function
Mar 31 2009 1:22PM GMT
Posted by: Jerry Lees
bginfo,
VBScript,
VBScript Functions,
Systems Administration,
systems management,
Systems administrator tools,
systems reporting
I recently had to provide the information displayed with BGINFO on a number of systems. Unfortunately, BGInfo only generates a bitmap, so far as I know, so I decided to write a script to generate the information and use this displayed information to send back to the person who requested it.
The function below is a part of the script I mentioned. It retrieves and returns text that represents the total amount of physical memory in a system.
You can view all the scripts in this BGINFO series here.
Here is the code:
Function GetPhysicalMemory(strComputer)
Dim colItems, objItem, address
Dim StrQuery
Dim objWMIService, RAM
GetPhysicalMemory = VbCrLf
RAM = 0
StrQuery = “SELECT * FROM Win32_PhysicalMemory”
Set objWMIService = GetObject(”winmgmts:\\” & strComputer & “\root\CIMV2″)
Set colItems = objWMIService.ExecQuery(strQuery,,48)
For Each objItem in colItems
RAM = RAM + objItem.capacity
Next
GetPhysicalMemory = GetPhysicalMemory & vbTab & (((RAM/1024)/1024)/1024) & ” Gb” & VbCrLf
End Function
Mar 30 2009 4:13PM GMT
Posted by: Jerry Lees
bginfo,
VBScript,
VBScript Functions,
Systems Administration,
systems management,
Systems administrator tools,
systems reporting
I recently had to provide the information displayed with BGINFO on a number of systems. Unfortunately, BGInfo only generates a bitmap, so far as I know, so I decided to write a script to generate the information and use this displayed information to send back to the person who requested it.
The function below is a part of the script I mentioned. It retrieves and returns text that represents the Processor information in the system and teh number of processors in the system. (Note: At this time I don’t have a dual core system to test it with, I believe that it will diplay the number of cores in the system. So, 4 dual core processors will be displayed as 8 processors/cores.)
You can view all the scripts in this BGINFO series here.
Here is the code:
Function GetCPUs(strComputer)
Dim colItems, objItem, address
Dim StrQuery
Dim objWMIService
Dim CoresCores = 0
StrQuery = “SELECT * FROM Win32_Processor”
Set objWMIService = GetObject(”winmgmts:\\” & strComputer & “\root\CIMV2″)
Set colItems = objWMIService.ExecQuery(strQuery,,48)
For Each objItem in colItems
If Replace objItem.name,”GHz”,””) = objItem.name then
GetCPUs =(round(objItem.CurrentClockSpeed/1024,1)) & “GHz” & ” ” & objItem.name & VbCrLf
Else
GetCPUs = objItem.name & VbCrLf
end if
Cores = Cores + 1
Next
GetCPUs = vbTab & Cores & ” Processors/Cores that are: ” & GetCPUs
End Function
Mar 25 2009 2:49PM GMT
Posted by: Jerry Lees
bginfo,
VBScript,
VBScript Functions,
Systems Administration,
systems management,
Systems administrator tools,
systems reporting
I recently had to provide the information displayed with BGINFO on a number of systems. Unfortunately, BGInfo only generates a bitmap, so far as I know, so I decided to write a script to generate the information and use this displayed information to send back to the person who requested it.
The function below is a part of the script I mentioned. It retrieves and returns text that represents the total space and the total free space on all the physical hard drives in a system.
You can view all the scripts in this BGINFO series here.
Here is the code:
Function GetMACAddress(strComputer)
Dim colItems, objItem, address
Dim StrQuery
Dim objWMIService
StrQuery = “SELECT * FROM Win32_NetworkAdapter”
Set objWMIService = GetObject(”winmgmts:\\” & strComputer & “\root\CIMV2″)
Set colItems = objWMIService.ExecQuery(strQuery,,48)
For Each objItem in colItems
if objitem.MACAddress <> vbnull Then
GetMACAddress = GetMACAddress & vbTab & objItem.name & “: ” & objItem.MACAddress & VbCrLf
End If
Next
End Function
Mar 20 2009 4:32PM GMT
Posted by: Jerry Lees
bginfo,
VBScript,
VBScript Functions,
Systems Administration,
systems management,
Systems administrator tools,
systems reporting
I recently had to provide the information displayed with BGINFO on a number of systems. Unfortunately, BGInfo only generates a bitmap, so far as I know, so I decided to write a script to generate the information and use this displayed information to send back to the person who requested it.
The function below is a part of the script I mentioned. It retrieves and returns text that represents the DNS Server settings for the network adapters in the system.
You can view all the scripts in this BGINFO series here.
Here is the code:
Function GetDNSAddress(strComputer)
on error resume next
Dim colItems, objItem, address
Dim StrQuery
Dim objWMIService
Dim IP
StrQuery = “SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True”
Set objWMIService = GetObject(”winmgmts:\\” & strComputer & “\root\CIMV2″)
Set colItems = objWMIService.ExecQuery(strQuery,,48)
For Each objItem in colItems
For Each address In objItem.DNSServerSearchOrder
IP = replace(address,”:”,””)
‘IP = Replace(IP,vbnull,”No IP Assigned”)
GetDNSAddress = GetDNSAddress & vbTab & mid(objItem.caption,InStr(objItem.caption,”]”)+2) & “: ” & IP & vbcrLF
Next
Next
On Error GoTo 0
End Function
Mar 17 2009 4:36PM GMT
Posted by: Jerry Lees
bginfo,
VBScript,
VBScript Functions,
Systems Administration,
systems management,
Systems administrator tools,
systems reporting
I recently had to provide the information displayed with BGINFO on a number of systems. Unfortunately, BGInfo only generates a bitmap, so far as I know, so I decided to write a script to generate the information and use this displayed information to send back to the person who requested it.
The function below is a part of the script I mentioned. It retrieves and returns text that represents the speed of teh network adapters in a system.
You can view all the scripts in this BGINFO series here.
Here is the code:
Function GetNetworkSpeed(strComputer)
Dim colItems, objItem, address
Dim StrQuery
Dim objWMIService
StrQuery = “SELECT * FROM Win32_NetworkAdapter”
Set objWMIService = GetObject(”winmgmts:\\” & strComputer & “\root\CIMV2″)
Set colItems = objWMIService.ExecQuery(strQuery,,48)
For Each objItem in colItems
GetNetworkSpeed = GetNetworkSpeed & vbTab & objItem.ProductName & vbCr
Next
End Function
Mar 13 2009 11:05AM GMT
Posted by: Jerry Lees
bginfo,
VBScript,
VBScript Functions,
Systems Administration,
systems management,
Systems administrator tools,
systems reporting,
Win32_logicaldisk
I recently had to provide the information displayed with BGINFO on a number of systems. Unfortunately, BGInfo only generates a bitmap, so far as I know, so I decided to write a script to generate the information and use this displayed information to send back to the person who requested it.
The function below is a part of the script I mentioned. It retrieves and returns text that represents the total space and the total free space on all the physical hard drives in a system.
You can view all the scripts in this BGINFO series here.
Here is the code:
Function GetDiskInfo(strComputer)
Dim colItems, objItem, address
Dim StrQuery
Dim objWMIService
StrQuery = “SELECT * FROM Win32_logicaldisk”
Set objWMIService = GetObject(”winmgmts:\\” & strComputer & “\root\CIMV2″)
Set colItems = objWMIService.ExecQuery(strQuery,,48)
GetDiskInfo = VbCrLf
For Each objItem in colItems
if objitem.MediaType = 12 Then
GetDiskInfo = GetDiskInfo & vbTab & objItem.Caption & “\ ” & Round((((objItem.size/1024)/1024)/1024),2) & ” GB Total with ” & Round((((objItem.Freespace/1024)/1024)/1024),2) & ” GB free” & ” (” & objitem.filesystem & “)” & VbCrLf
End If
Next
End Function
Aug 27 2008 6:12PM GMT
Posted by: Jerry Lees
free software,
free tools,
Systems administrator tools,
software resources,
essential tools,
undelete,
undelete files,
windows tools,
disk utilities,
drive utilities,
Recovery Tools
Please note: This is a re-posting of a previously deleted post, details to come.
The next tool I’d like to share with you in my Essential Tools series is another useful tool from a company called Piriform, who created a free drive defragmenter tool in the series, Defraggler.
This tool, Recuva, is an excellent file recovery tool— hence the name Recuva, which is pronounced like recover. Recuva is easy to use and quite impressive in it’s ability to recover files.
It first presents you with a wizard that, if you chose to use it, will guide you through the selection, scanning, and recovery process. Once it has scanned your drive it presents you with a list of files that were deleted– along with their recover ability in plain English! Simply select the files you need to recover and then choose to recover them and your on your way to getting back to that game of Halo with your co workers!
So why not take a second an run over and download the application and give it a shot– It’s FREE!!!
Know of a tool that you think is essential? Post a comment here and if I don’t already have it in my tool belt, I’ll add it and give it a shot. If it makes the grade– I’ll add it to the list of tools to review. The only criteria are:
- The tool must be free, or inexpensive with a “Per User” type license. (No pay per installation licenses, please)
- The tool (or it’s installation file) must be small enough to fit on a 256Mb flash drive for portability.
- Command line run time options are beneficial, but not required.
- If it has ads… it needs be truly INVALUABLE.
- It should make the user’s job easier by gathering information or preforming a task that a typical Network or Systems Administrator would preform.
Enjoy!