<?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: Reading share security with PowerShell</title>
	<atom:link href="http://www.indented.co.uk/index.php/2009/02/20/reading-share-security-with-powershell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.indented.co.uk/index.php/2009/02/20/reading-share-security-with-powershell/</link>
	<description></description>
	<lastBuildDate>Thu, 09 Sep 2010 08:18:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Justin McAlister</title>
		<link>http://www.indented.co.uk/index.php/2009/02/20/reading-share-security-with-powershell/comment-page-1/#comment-279</link>
		<dc:creator>Justin McAlister</dc:creator>
		<pubDate>Mon, 26 Apr 2010 19:37:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.highorbit.co.uk/?p=972#comment-279</guid>
		<description>Got it!  Thank you very much.</description>
		<content:encoded><![CDATA[<p>Got it!  Thank you very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.indented.co.uk/index.php/2009/02/20/reading-share-security-with-powershell/comment-page-1/#comment-278</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 26 Apr 2010 19:24:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.highorbit.co.uk/?p=972#comment-278</guid>
		<description>My function cheats a little, passing the values from the ACE into the constructor for Security.AccessControl.FileSystemAccessRule. You&#039;re spot on with the access mask value behaviour. To finish it off you need to read the AceType, that&#039;ll tell you if it&#039;s Allow or Deny.

Chris</description>
		<content:encoded><![CDATA[<p>My function cheats a little, passing the values from the ACE into the constructor for Security.AccessControl.FileSystemAccessRule. You&#8217;re spot on with the access mask value behaviour. To finish it off you need to read the AceType, that&#8217;ll tell you if it&#8217;s Allow or Deny.</p>
<p>Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin McAlister</title>
		<link>http://www.indented.co.uk/index.php/2009/02/20/reading-share-security-with-powershell/comment-page-1/#comment-277</link>
		<dc:creator>Justin McAlister</dc:creator>
		<pubDate>Mon, 26 Apr 2010 19:13:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.highorbit.co.uk/?p=972#comment-277</guid>
		<description>Hi Chris,

I have been trying to do something similar, and was wondering if you came up with the same results.  So with share level permissions there are really only 3 levels of access granting Read, Change, and Full Control.  So I put this together and it reports against those 3 without any issues:
[code lang=&quot;ps&quot;]
(GWMI Win32_LogicalShareSecuritySetting -Computer SERVERNAME).GetSecurityDescriptor().Descriptor.DACL &#124; Select `
	@{N=&quot;Account Name&quot;;E={
		If($_.Trustee.Domain -eq $null){$_.Trustee.Name}
		Else{$_.Trustee.Domain + &quot;\&quot; + $_.Trustee.Name}
	}}, `
	@{N=&quot;Share Permissions&quot;;E={
		Switch($_.AccessMask){
			2032127 {$strSharePerm = &quot;Full Control&quot;} 
			1179817 {$strSharePerm = &quot;Read&quot;}
			1245631 {$strSharePerm = &quot;Change&quot;} 
			Default {$strSharePerm = &quot;Unknown&quot;} 
		}
		$strSharePerm
	}}
[/code]
Please excuse the ugly formatting, and I am sure there is a far better way to do it, but my issue is with implicitly denied share permissions.  The .AccessMask property value for allow full control appears to be the same as deny full control.  Same with read and change.  Now it&#039;s a rare case where I come acrossed deny share permissions, but it&#039;s possible.

I was wondering if you has the same issue with your function.  This is omnipower321 from EE by the way.  You have answered a ton of my questions, and I am a fan of your site.</description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>I have been trying to do something similar, and was wondering if you came up with the same results.  So with share level permissions there are really only 3 levels of access granting Read, Change, and Full Control.  So I put this together and it reports against those 3 without any issues:</p>
<pre class="brush: powershell;">
(GWMI Win32_LogicalShareSecuritySetting -Computer SERVERNAME).GetSecurityDescriptor().Descriptor.DACL | Select `
	@{N=&quot;Account Name&quot;;E={
		If($_.Trustee.Domain -eq $null){$_.Trustee.Name}
		Else{$_.Trustee.Domain + &quot;\&quot; + $_.Trustee.Name}
	}}, `
	@{N=&quot;Share Permissions&quot;;E={
		Switch($_.AccessMask){
			2032127 {$strSharePerm = &quot;Full Control&quot;}
			1179817 {$strSharePerm = &quot;Read&quot;}
			1245631 {$strSharePerm = &quot;Change&quot;}
			Default {$strSharePerm = &quot;Unknown&quot;}
		}
		$strSharePerm
	}}
</pre>
<p>Please excuse the ugly formatting, and I am sure there is a far better way to do it, but my issue is with implicitly denied share permissions.  The .AccessMask property value for allow full control appears to be the same as deny full control.  Same with read and change.  Now it&#8217;s a rare case where I come acrossed deny share permissions, but it&#8217;s possible.</p>
<p>I was wondering if you has the same issue with your function.  This is omnipower321 from EE by the way.  You have answered a ton of my questions, and I am a fan of your site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kleine Tipps f&#252;r Zwischendurch (Teil 13) &#8211; Umgang mit UNC-Pfaden &#171; Peter&#8217;s PowerShell Blog (German only)</title>
		<link>http://www.indented.co.uk/index.php/2009/02/20/reading-share-security-with-powershell/comment-page-1/#comment-40</link>
		<dc:creator>Kleine Tipps f&#252;r Zwischendurch (Teil 13) &#8211; Umgang mit UNC-Pfaden &#171; Peter&#8217;s PowerShell Blog (German only)</dc:creator>
		<pubDate>Fri, 22 May 2009 12:28:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.highorbit.co.uk/?p=972#comment-40</guid>
		<description>[...] Wie sich per WMI und der Win32_LogicalShareSecuritySetting-Klasse die Freigabeberechtigungen auslesen lassen, verrät ein interessanter Blog-Eintrag. [...]</description>
		<content:encoded><![CDATA[<p>[...] Wie sich per WMI und der Win32_LogicalShareSecuritySetting-Klasse die Freigabeberechtigungen auslesen lassen, verrät ein interessanter Blog-Eintrag. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
