<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[gOxiA=苏繁=SuFan Blog]]></title> 
<link>https://maytide.net/index.php</link> 
<description><![CDATA[gOxiA,苏繁,sufan,Microsoft MVP]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[gOxiA=苏繁=SuFan Blog]]></copyright>
<item>
<link>https://maytide.net/read.php/866.htm</link>
<title><![CDATA[确定在某个进程中运行的服务]]></title> 
<author>gOxiA &lt;sufan_cn@msn.com&gt;</author>
<category><![CDATA[PowerShell 和脚本]]></category>
<pubDate>Sat, 09 Jul 2005 01:45:56 +0000</pubDate> 
<guid>https://maytide.net/read.php/866.htm</guid> 
<description>
<![CDATA[ 
	<span><div><p><strong>描述</strong><br />返回在 Services.exe 进程中运行的服务的列表。</p></div><div><p><br /><strong>脚本代码<br /></strong>strComputer = &quot;.&quot;<br />Set objWMIService = GetObject(&quot;winmgmts:&quot; _<br />&amp; &quot;&#123; impersonationLevel=impersonate &#125;!&#92;&#92;&quot; &amp; strComputer &amp; &quot;&#92;root&#92;cimv2&quot;)<br />Set colListOfServices = objWMIService.ExecQuery _<br />(&quot;Select * from Win32_Service&quot;)<br />For Each objService in colListOfServices<br />If objService.PathName = &quot;C:&#92;WINDOWS&#92;system32&#92;services.exe&quot; Then<br />Wscript.Echo objService.DisplayName<br />End If<br />Next</p></div></span>
]]>
</description>
</item>
</channel>
</rss>