 




<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The VBScript Network and Systems Administrator&#039;s Cafe &#187; bginfo</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/tag/bginfo/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator</link>
	<description></description>
	<lastBuildDate>Tue, 11 Oct 2011 18:36:53 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Writing a BGINFO like Script: Displaying IP Address settings with WMI via the Win32_NetworkAdapterConfiguration class</title>
		<link>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-ip-address-settings-with-wmi-via-the-win32_networkadapterconfiguration-class/</link>
		<comments>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-ip-address-settings-with-wmi-via-the-win32_networkadapterconfiguration-class/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 16:23:23 +0000</pubDate>
		<dc:creator>Jerry Lees</dc:creator>
				<category><![CDATA[bginfo]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Systems administrator tools]]></category>
		<category><![CDATA[systems management]]></category>
		<category><![CDATA[systems reporting]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/?p=269</guid>
		<description><![CDATA[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 [...]]]></description>
				<content:encoded><![CDATA[<p>I recently had to provide the information displayed with <a href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx" target="_blank">BGINFO</a> 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.</p>
<p>The function below is a part of the script I mentioned. It retrieves and returns text that represents the IP address settings for the network cards installed in a system.</p>
<p>You can view all the scripts in this <a href="http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/tag/bginfo/">BGINFO series here</a>.</p>
<p>Here is the code:</p>
<p><span style="color: #0000ff">Function GetIPAddresses(strComputer)<br />
Dim colItems, objItem, address<br />
Dim StrQuery<br />
Dim objWMIService<br />
Dim IP</span></p>
<p><span style="color: #0000ff">StrQuery = &#8220;SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True&#8221;<br />
Set objWMIService = GetObject(&#8220;winmgmts:\\&#8221; &amp; strComputer &amp; &#8220;\root\CIMV2&#8243;)<br />
Set colItems = objWMIService.ExecQuery(strQuery,,48) </span></p>
<p><span style="color: #0000ff">For Each objItem in colItems<br />
For Each address In objItem.ipaddress<br />
IP = replace(address,&#8221;:&#8221;,&#8221;")<br />
&#8216;IP = Replace(IP,vbnull,&#8221;No IP Assigned&#8221;)<br />
GetIPAddresses = GetIPAddresses &amp; vbTab &amp; mid(objItem.caption,InStr(objItem.caption,&#8221;]&#8221;)+2) &amp; &#8220;: &#8221; &amp; IP &amp; vbcrLF<br />
Next<br />
Next<br />
End Function</span></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-ip-address-settings-with-wmi-via-the-win32_networkadapterconfiguration-class/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Writing a BGINFO like Script: Displaying Operating System Information with WMI via the Win32_OperatingSystem class</title>
		<link>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-operating-system-information-with-wmi-via-the-win32_operatingsystem-class/</link>
		<comments>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-operating-system-information-with-wmi-via-the-win32_operatingsystem-class/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 16:23:21 +0000</pubDate>
		<dc:creator>Jerry Lees</dc:creator>
				<category><![CDATA[bginfo]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Systems administrator tools]]></category>
		<category><![CDATA[systems management]]></category>
		<category><![CDATA[systems reporting]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/?p=263</guid>
		<description><![CDATA[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 [...]]]></description>
				<content:encoded><![CDATA[<p>I recently had to provide the information displayed with <a href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx" target="_blank">BGINFO</a> 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.</p>
<p>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.</p>
<p>You can view all the scripts in this <a href="http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/tag/bginfo/">BGINFO series here</a>.</p>
<p>Here is the code:</p>
<p><span style="color: #0000ff">Function GetOSVersion(strComputer)<br />
Dim colItems, objItem, address<br />
Dim StrQuery<br />
Dim objWMIService<br />
GetOSVersion = VbCrLf<span style="color: #0000ff">StrQuery = &#8220;SELECT * FROM Win32_OperatingSystem&#8221;<br />
Set objWMIService = GetObject(&#8220;winmgmts:\\&#8221; &amp; strComputer &amp; &#8220;\root\CIMV2&#8243;)<br />
Set colItems = objWMIService.ExecQuery(strQuery,,48)</p>
<p></span></span></p>
<p> </p>
<p><span style="color: #0000ff">For Each objItem in colItems<br />
GetOSVersion = GetOSVersion &amp; vbTab &amp; replace(objItem.caption,&#8221;(R)&#8221;,&#8221;") &amp; VbCrLf<br />
GetOSVersion = GetOSVersion &amp; vbTab &amp; &#8220;Service Pack &#8221; &amp; objitem.ServicePackMajorVersion &amp; VbCrLf<br />
Next<br />
End Function</span></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-operating-system-information-with-wmi-via-the-win32_operatingsystem-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a BGINFO like Script: Displaying Page File information with WMI via the Win32_Pagefile class</title>
		<link>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-page-file-information-with-wmi-via-the-win32_pagefile-class/</link>
		<comments>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-page-file-information-with-wmi-via-the-win32_pagefile-class/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 13:23:07 +0000</pubDate>
		<dc:creator>Jerry Lees</dc:creator>
				<category><![CDATA[bginfo]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Systems administrator tools]]></category>
		<category><![CDATA[systems management]]></category>
		<category><![CDATA[systems reporting]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/?p=264</guid>
		<description><![CDATA[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 [...]]]></description>
				<content:encoded><![CDATA[<p>I recently had to provide the information displayed with <a href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx" target="_blank">BGINFO</a> 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.</p>
<p>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.</p>
<p>You can view all the scripts in this <a href="http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/tag/bginfo/">BGINFO series here</a>.</p>
<p>Here is the code:</p>
<p><span style="color: #0000ff">Function GetPageFile(strComputer)<br />
Dim colItems, objItem, address<br />
Dim StrQuery<br />
Dim objWMIService<br />
GetPageFile = VbCrLf<span style="color: #0000ff">StrQuery = &#8220;SELECT * FROM Win32_PageFile&#8221;<br />
Set objWMIService = GetObject(&#8220;winmgmts:\\&#8221; &amp; strComputer &amp; &#8220;\root\CIMV2&#8243;)<br />
Set colItems = objWMIService.ExecQuery(strQuery,,48)</p>
<p></span></span></p>
<p> </p>
<p><span style="color: #0000ff">For Each objItem in colItems<br />
GetPageFile = GetPageFile &amp; vbTab &amp; ((objItem.filesize/1024)/1024) &amp; &#8221; Mb&#8221; &amp; vbcrlf<br />
Next<br />
End Function</span></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-page-file-information-with-wmi-via-the-win32_pagefile-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a BGINFO like Script: Displaying Memory information via WMI using the Win32_PhysicalMemory class</title>
		<link>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-memory-information-via-wmi-using-the-win32_physicalmemory-class/</link>
		<comments>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-memory-information-via-wmi-using-the-win32_physicalmemory-class/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 13:22:58 +0000</pubDate>
		<dc:creator>Jerry Lees</dc:creator>
				<category><![CDATA[bginfo]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Systems administrator tools]]></category>
		<category><![CDATA[systems management]]></category>
		<category><![CDATA[systems reporting]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/?p=265</guid>
		<description><![CDATA[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 [...]]]></description>
				<content:encoded><![CDATA[<p>I recently had to provide the information displayed with <a href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx" target="_blank">BGINFO</a> 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.</p>
<p>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.</p>
<p>You can view all the scripts in this <a href="http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/tag/bginfo/">BGINFO series here</a>.</p>
<p>Here is the code:</p>
<p><span style="color: #0000ff">Function GetPhysicalMemory(strComputer)<br />
Dim colItems, objItem, address<br />
Dim StrQuery<br />
Dim objWMIService, RAM<br />
GetPhysicalMemory = VbCrLf<br />
RAM = 0</span></p>
<p><span style="color: #0000ff">StrQuery = &#8220;SELECT * FROM Win32_PhysicalMemory&#8221;<br />
Set objWMIService = GetObject(&#8220;winmgmts:\\&#8221; &amp; strComputer &amp; &#8220;\root\CIMV2&#8243;)<br />
Set colItems = objWMIService.ExecQuery(strQuery,,48) </span></p>
<p><span style="color: #0000ff">For Each objItem in colItems<br />
RAM = RAM + objItem.capacity<br />
Next<br />
GetPhysicalMemory = GetPhysicalMemory &amp; vbTab &amp; (((RAM/1024)/1024)/1024) &amp; &#8221; Gb&#8221; &amp; VbCrLf<br />
End Function</span></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-memory-information-via-wmi-using-the-win32_physicalmemory-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a BGINFO like Script: Displaying Processor information with WMI via the Win32_Processor class</title>
		<link>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-processor-information-with-wmi-via-the-win32_processor-class/</link>
		<comments>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-processor-information-with-wmi-via-the-win32_processor-class/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 16:13:53 +0000</pubDate>
		<dc:creator>Jerry Lees</dc:creator>
				<category><![CDATA[bginfo]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Systems administrator tools]]></category>
		<category><![CDATA[systems management]]></category>
		<category><![CDATA[systems reporting]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/?p=266</guid>
		<description><![CDATA[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 [...]]]></description>
				<content:encoded><![CDATA[<p>I recently had to provide the information displayed with <a href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx" target="_blank">BGINFO</a> 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.</p>
<p>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. <em>(<strong>Note</strong>: At this time I don&#8217;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.)</em></p>
<p>You can view all the scripts in this <a href="http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/tag/bginfo/">BGINFO series here</a>.</p>
<p>Here is the code:</p>
<div><span style="color: #0000ff">Function GetCPUs(strComputer)<br />
Dim colItems, objItem, address<br />
Dim StrQuery<br />
Dim objWMIService<br />
Dim Cores<span style="color: #0000ff">Cores = 0</span></span></div>
<p><span style="color: #0000ff"><span style="color: #0000ff"> </p>
<p></span></span></p>
<p> </p>
<p><span style="color: #0000ff">StrQuery = &#8220;SELECT * FROM Win32_Processor&#8221;<br />
Set objWMIService = GetObject(&#8220;winmgmts:\\&#8221; &amp; strComputer &amp; &#8220;\root\CIMV2&#8243;)<br />
Set colItems = objWMIService.ExecQuery(strQuery,,48) </span></p>
<p><span style="color: #0000ff">For Each objItem in colItems<br />
If Replace(objItem.name,&#8221;GHz&#8221;,&#8221;") = objItem.name then<br />
GetCPUs =(round(objItem.CurrentClockSpeed/1024,1)) &amp; &#8220;GHz&#8221; &amp; &#8221; &#8221; &amp; objItem.name &amp; VbCrLf<br />
Else<br />
GetCPUs = objItem.name &amp; VbCrLf<br />
end if<br />
Cores = Cores + 1<br />
Next<br />
GetCPUs =  vbTab &amp; Cores &amp; &#8221; Processors/Cores that are: &#8221; &amp; GetCPUs<br />
End Function</span></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-processor-information-with-wmi-via-the-win32_processor-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a BGINFO like Script: Displaying MAC Address information with WMI via the Win32_NetworkAdapter class</title>
		<link>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-mac-address-information-with-wmi-via-the-win32_networkadapter-class/</link>
		<comments>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-mac-address-information-with-wmi-via-the-win32_networkadapter-class/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 14:49:51 +0000</pubDate>
		<dc:creator>Jerry Lees</dc:creator>
				<category><![CDATA[bginfo]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Systems administrator tools]]></category>
		<category><![CDATA[systems management]]></category>
		<category><![CDATA[systems reporting]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/?p=268</guid>
		<description><![CDATA[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 [...]]]></description>
				<content:encoded><![CDATA[<p>I recently had to provide the information displayed with <a href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx" target="_blank">BGINFO</a> 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.</p>
<p>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.</p>
<p>You can view all the scripts in this <a href="http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/tag/bginfo/">BGINFO series here</a>.</p>
<p>Here is the code:</p>
<p><span style="color: #0000ff">Function GetMACAddress(strComputer)<br />
Dim colItems, objItem, address<br />
Dim StrQuery<br />
Dim objWMIService</span></p>
<p><span style="color: #0000ff">StrQuery = &#8220;SELECT * FROM Win32_NetworkAdapter&#8221;<br />
Set objWMIService = GetObject(&#8220;winmgmts:\\&#8221; &amp; strComputer &amp; &#8220;\root\CIMV2&#8243;)<br />
Set colItems = objWMIService.ExecQuery(strQuery,,48) </span></p>
<p><span style="color: #0000ff">For Each objItem in colItems<br />
if objitem.MACAddress &lt;&gt; vbnull Then<br />
GetMACAddress = GetMACAddress &amp; vbTab &amp; objItem.name &amp; &#8220;: &#8221; &amp; objItem.MACAddress &amp; VbCrLf<br />
End If<br />
Next<br />
End Function</span></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-mac-address-information-with-wmi-via-the-win32_networkadapter-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a BGINFO like Script: Displaying DNS Server settings with WMI via the Win32_NetworkAdapterConfiguration class</title>
		<link>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-dns-server-settings-with-wmi-via-the-win32_networkadapterconfiguration-class/</link>
		<comments>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-dns-server-settings-with-wmi-via-the-win32_networkadapterconfiguration-class/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 16:32:45 +0000</pubDate>
		<dc:creator>Jerry Lees</dc:creator>
				<category><![CDATA[bginfo]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Systems administrator tools]]></category>
		<category><![CDATA[systems management]]></category>
		<category><![CDATA[systems reporting]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/?p=267</guid>
		<description><![CDATA[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 [...]]]></description>
				<content:encoded><![CDATA[<p>I recently had to provide the information displayed with <a href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx" target="_blank">BGINFO</a> 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.</p>
<p>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.</p>
<p>You can view all the scripts in this <a href="http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/tag/bginfo/">BGINFO series here</a>.</p>
<p>Here is the code:</p>
<p><span style="color: #0000ff">Function GetDNSAddress(strComputer)<br />
on error resume next<br />
Dim colItems, objItem, address<br />
Dim StrQuery<br />
Dim objWMIService<br />
Dim IP</span></p>
<p><span style="color: #0000ff"> StrQuery = &#8220;SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True&#8221;<br />
Set objWMIService = GetObject(&#8220;winmgmts:\\&#8221; &amp; strComputer &amp; &#8220;\root\CIMV2&#8243;)<br />
Set colItems = objWMIService.ExecQuery(strQuery,,48) </span></p>
<p><span style="color: #0000ff"> For Each objItem in colItems<br />
For Each address In objItem.DNSServerSearchOrder<br />
IP = replace(address,&#8221;:&#8221;,&#8221;")<br />
&#8216;IP = Replace(IP,vbnull,&#8221;No IP Assigned&#8221;)<br />
GetDNSAddress = GetDNSAddress &amp; vbTab &amp; mid(objItem.caption,InStr(objItem.caption,&#8221;]&#8221;)+2) &amp; &#8220;: &#8221; &amp; IP &amp; vbcrLF<br />
Next<br />
Next<br />
On Error GoTo 0<br />
End Function<br />
</span></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-dns-server-settings-with-wmi-via-the-win32_networkadapterconfiguration-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a BGINFO like Script: Displaying Network Adapter Speed with WMI via the Win32_NetworkAdapter class</title>
		<link>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-network-adapter-speed-with-wmi-via-the-win32_networkadapter-class/</link>
		<comments>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-network-adapter-speed-with-wmi-via-the-win32_networkadapter-class/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 16:36:10 +0000</pubDate>
		<dc:creator>Jerry Lees</dc:creator>
				<category><![CDATA[bginfo]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Systems administrator tools]]></category>
		<category><![CDATA[systems management]]></category>
		<category><![CDATA[systems reporting]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/?p=270</guid>
		<description><![CDATA[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 [...]]]></description>
				<content:encoded><![CDATA[<p>I recently had to provide the information displayed with <a href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx" target="_blank">BGINFO</a> 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.</p>
<p>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.</p>
<p>You can view all the scripts in this <a href="http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/tag/bginfo/">BGINFO series here</a>.</p>
<p>Here is the code:</p>
<p><span style="color: #0000ff">Function GetNetworkSpeed(strComputer)<br />
Dim colItems, objItem, address<br />
Dim StrQuery<br />
Dim objWMIService</span></p>
<p><span style="color: #0000ff"> StrQuery = &#8220;SELECT * FROM Win32_NetworkAdapter&#8221;<br />
Set objWMIService = GetObject(&#8220;winmgmts:\\&#8221; &amp; strComputer &amp; &#8220;\root\CIMV2&#8243;)<br />
Set colItems = objWMIService.ExecQuery(strQuery,,48) </span></p>
<p><span style="color: #0000ff"> For Each objItem in colItems<br />
GetNetworkSpeed = GetNetworkSpeed &amp; vbTab &amp; objItem.ProductName &amp; vbCr<br />
Next<br />
End Function<br />
</span></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-network-adapter-speed-with-wmi-via-the-win32_networkadapter-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a BGINFO like Script: Displaying Disk Statistics with WMI via the Win32_LogicalDisk class</title>
		<link>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-disk-statistics-with-wmi-via-the-win32_logicaldisk-class/</link>
		<comments>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-disk-statistics-with-wmi-via-the-win32_logicaldisk-class/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 11:05:23 +0000</pubDate>
		<dc:creator>Jerry Lees</dc:creator>
				<category><![CDATA[bginfo]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Systems administrator tools]]></category>
		<category><![CDATA[systems management]]></category>
		<category><![CDATA[systems reporting]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>
		<category><![CDATA[Win32_logicaldisk]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-disk-statistics-with-wmi-via-the-win32_logicaldisk-class/</guid>
		<description><![CDATA[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 [...]]]></description>
				<content:encoded><![CDATA[<p>I recently had to provide the information displayed with <a href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx" target="_blank">BGINFO</a> 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.</p>
<p>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.</p>
<p>You can view all the scripts in this <a href="http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/tag/bginfo/">BGINFO series here</a>.</p>
<p>Here is the code:</p>
<p><span style="color: #0000ff">Function GetDiskInfo(strComputer)<br />
Dim colItems, objItem, address<br />
Dim StrQuery<br />
Dim objWMIService</span></p>
<p><span style="color: #0000ff"> StrQuery = &#8220;SELECT * FROM Win32_logicaldisk&#8221;<br />
Set objWMIService = GetObject(&#8220;winmgmts:\\&#8221; &amp; strComputer &amp; &#8220;\root\CIMV2&#8243;)<br />
Set colItems = objWMIService.ExecQuery(strQuery,,48)<br />
GetDiskInfo = VbCrLf</span></p>
<p><span style="color: #0000ff"> For Each objItem in colItems<br />
if objitem.MediaType = 12 Then<br />
GetDiskInfo = GetDiskInfo &amp; vbTab &amp; objItem.Caption &amp; &#8220;\ &#8221; &amp; Round((((objItem.size/1024)/1024)/1024),2) &amp; &#8221; GB Total with &#8221; &amp; Round((((objItem.Freespace/1024)/1024)/1024),2) &amp; &#8221; GB free&#8221; &amp; &#8221; (&#8221; &amp; objitem.filesystem &amp; &#8220;)&#8221; &amp; VbCrLf<br />
End If<br />
Next<br />
End Function<br />
</span></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/writing-a-bginfo-like-script-displaying-disk-statistics-with-wmi-via-the-win32_logicaldisk-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
