<?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>Savory Ape &#187; microsoft</title>
	<atom:link href="http://savoryape.com/tag/microsoft/feed/" rel="self" type="application/rss+xml" />
	<link>http://savoryape.com</link>
	<description>Progressive Internet Solutions</description>
	<lastBuildDate>Tue, 09 Mar 2010 13:44:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Listing All Win32 CIMv2 Providers</title>
		<link>http://savoryape.com/2009/06/list-win32-cimv2/</link>
		<comments>http://savoryape.com/2009/06/list-win32-cimv2/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 17:00:53 +0000</pubDate>
		<dc:creator>chrishota</dc:creator>
				<category><![CDATA[MidSOUTH]]></category>
		<category><![CDATA[cim]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[wbem]]></category>
		<category><![CDATA[wim]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://savoryape.com/?p=16</guid>
		<description><![CDATA[When starting to troubleshoot a Windows Server problem, the best place to look is the Windows Management Instrumentation (WMI); this little enclave of information—on every Windows machine—acts like a datastore representing the configuration of every nook and cranny of a system. But knowing what to look for is half the battle. Recently, I was faced [...]]]></description>
			<content:encoded><![CDATA[<p>When starting to troubleshoot a Windows Server problem, the best place to look is the Windows Management Instrumentation (WMI); this little enclave of information—on every Windows machine—acts like a datastore representing the configuration of every nook and cranny of a system.  But knowing what to look for is half the battle.</p>
<p>Recently, I was faced with diagnosing slow replication times for Branch Office Distributed File System Replication under Windows Server 2003.  I had no idea where to look, so I referenced the following script, pointed the two instances of strComputer to our DFS-enabled file server, and looked for DFS-specific properties and methods:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cscript <span style="color: #ff0000;">&quot;List Win32 Providers.vbs&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> dfs</pre></div></div>

<p>This gave me the performance counters I could use to monitor performance, as well as how to programmatically create DFS shares and namespaces.</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">strComputer = <span style="color: #800000;">&quot;.&quot;</span>
<span style="color: #000080;">Set</span> objWMIService=GetObject(<span style="color: #800000;">&quot;winmgmts:{impersonationLevel=impersonate}!\\&quot;</span> &amp; strComputer &amp; <span style="color: #800000;">&quot;\root\cimv2&quot;</span>)
&nbsp;
<span style="color: #000080;">For</span> <span style="color: #000080;">Each</span> objclass <span style="color: #000080;">in</span> objWMIService.SubclassesOf()
    intCounter=0
    <span style="color: #000080;">If</span> Left(objClass.Path_.Class,5) = <span style="color: #800000;">&quot;Win32&quot;</span> <span style="color: #000080;">Then</span>
        <span style="color: #000080;">For</span> <span style="color: #000080;">Each</span> Qualifier <span style="color: #000080;">in</span> objClass.Qualifiers_
            <span style="color: #000080;">If</span> UCase(Trim(Qualifier.Name)) = <span style="color: #800000;">&quot;ASSOCIATION&quot;</span> <span style="color: #000080;">Then</span>
                intCounter = 1
            <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
        <span style="color: #000080;">Next</span>
        <span style="color: #000080;">If</span> x = 0 <span style="color: #000080;">Then</span>
            strComputer = <span style="color: #800000;">&quot;.&quot;</span>
            <span style="color: #000080;">Set</span> objWMIService = GetObject _
                (<span style="color: #800000;">&quot;winmgmts:{impersonationLevel=impersonate}!\\&quot;</span> &amp; _
                    strComputer &amp; <span style="color: #800000;">&quot;\root\cimv2&quot;</span>)
            <span style="color: #000080;">Set</span> strClass = objWMIService.<span style="color: #000080;">Get</span>(objClass.Path_.Class)
            Wscript.Echo <span style="color: #800000;">&quot;PROPERTIES:&quot;</span>
            <span style="color: #000080;">For</span> <span style="color: #000080;">each</span> strItem <span style="color: #000080;">in</span> strClass.properties_
                Wscript.Echo objClass.Path_.Class &amp; vbTab &amp; strItem.name 
            <span style="color: #000080;">Next</span>
            Wscript.Echo <span style="color: #800000;">&quot;METHODS:&quot;</span>
            <span style="color: #000080;">For</span> <span style="color: #000080;">Each</span> strItem <span style="color: #000080;">in</span> strClass.methods_
                Wscript.Echo objClass.Path_.Class &amp; vbTab &amp; strItem.name 
            <span style="color: #000080;">Next</span>
        <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
    <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
<span style="color: #000080;">Next</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://savoryape.com/2009/06/list-win32-cimv2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
