<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: Get SQL Server Service Accounts with WMI	</title>
	<atom:link href="https://www.dbaduck.com/get-sql-server-service-accounts-with-wmi/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbaduck.com/get-sql-server-service-accounts-with-wmi/</link>
	<description>DBA</description>
	<lastBuildDate>Wed, 18 May 2022 18:48:06 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>
		By: Reiner		</title>
		<link>https://www.dbaduck.com/get-sql-server-service-accounts-with-wmi/#comment-31</link>

		<dc:creator><![CDATA[Reiner]]></dc:creator>
		<pubDate>Mon, 01 Oct 2012 08:54:29 +0000</pubDate>
		<guid isPermaLink="false">http://dbaduck.wpengine.com/?p=75#comment-31</guid>

					<description><![CDATA[Hi Ben,

You&#039;re right, there&#039;s no &#039;ServiceAccount&#039; property. For some reason MS has obscured it under the name of &#039;StartName&#039;.

Here&#039;s how I do it:

$servers = &#039;Server1&#039;, &#039;Server2&#039;

$servers &#124; ForEach { Get-WMIObject Win32_Service -computer $_ &#124; Where-Object { $_.Name -like &#039;MSSQL*&#039; } &#124; Select SystemName, Name, @{Name=”ServiceAccount”;Expression={$_.StartName}}  }]]></description>
			<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>You&#8217;re right, there&#8217;s no &#8216;ServiceAccount&#8217; property. For some reason MS has obscured it under the name of &#8216;StartName&#8217;.</p>
<p>Here&#8217;s how I do it:</p>
<p>$servers = &#8216;Server1&#8217;, &#8216;Server2&#8217;</p>
<p>$servers | ForEach { Get-WMIObject Win32_Service -computer $_ | Where-Object { $_.Name -like &#8216;MSSQL*&#8217; } | Select SystemName, Name, @{Name=”ServiceAccount”;Expression={$_.StartName}}  }</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
