<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://znil.net/index.php?action=history&amp;feed=atom&amp;title=PowerShell_Ordnern_Gruppen_zuordnen_und_Rechte_setzen</id>
	<title>PowerShell Ordnern Gruppen zuordnen und Rechte setzen - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://znil.net/index.php?action=history&amp;feed=atom&amp;title=PowerShell_Ordnern_Gruppen_zuordnen_und_Rechte_setzen"/>
	<link rel="alternate" type="text/html" href="https://znil.net/index.php?title=PowerShell_Ordnern_Gruppen_zuordnen_und_Rechte_setzen&amp;action=history"/>
	<updated>2026-04-20T16:25:03Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in znilwiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://znil.net/index.php?title=PowerShell_Ordnern_Gruppen_zuordnen_und_Rechte_setzen&amp;diff=13678&amp;oldid=prev</id>
		<title>BLinz am 21. Juli 2023 um 08:51 Uhr</title>
		<link rel="alternate" type="text/html" href="https://znil.net/index.php?title=PowerShell_Ordnern_Gruppen_zuordnen_und_Rechte_setzen&amp;diff=13678&amp;oldid=prev"/>
		<updated>2023-07-21T08:51:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 21. Juli 2023, 10:51 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;u&amp;gt;&amp;#039;&amp;#039;&amp;#039;Changelog:&amp;#039;&amp;#039;&amp;#039;&amp;lt;/u&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;u&amp;gt;&amp;#039;&amp;#039;&amp;#039;Changelog:&amp;#039;&amp;#039;&amp;#039;&amp;lt;/u&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 20.07.2023 erste Version&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 20.07.2023 erste Version&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* 21.07.2023 Ersteller/Besitzer entfernt - bei Netzlaufwerken war das eine schlechte Idee&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Problem==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Problem==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>BLinz</name></author>
	</entry>
	<entry>
		<id>https://znil.net/index.php?title=PowerShell_Ordnern_Gruppen_zuordnen_und_Rechte_setzen&amp;diff=13677&amp;oldid=prev</id>
		<title>BLinz: /* Lösung */</title>
		<link rel="alternate" type="text/html" href="https://znil.net/index.php?title=PowerShell_Ordnern_Gruppen_zuordnen_und_Rechte_setzen&amp;diff=13677&amp;oldid=prev"/>
		<updated>2023-07-21T08:50:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Lösung&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 21. Juli 2023, 10:50 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l46&quot;&gt;Zeile 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 46:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         $o_ace3 = New-Object System.Security.Accesscontrol.FileSystemAccessRule (&amp;quot;SYSTEM&amp;quot;, &amp;quot;FullControl&amp;quot;, &amp;quot;ContainerInherit,ObjectInherit&amp;quot;, &amp;quot;none&amp;quot;, &amp;quot;Allow&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         $o_ace3 = New-Object System.Security.Accesscontrol.FileSystemAccessRule (&amp;quot;SYSTEM&amp;quot;, &amp;quot;FullControl&amp;quot;, &amp;quot;ContainerInherit,ObjectInherit&amp;quot;, &amp;quot;none&amp;quot;, &amp;quot;Allow&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         $o_acl.AddAccessRule($o_ace3)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         $o_acl.AddAccessRule($o_ace3)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         $o_ace4 = New-Object System.Security.Accesscontrol.FileSystemAccessRule (&quot;ERSTELLER-BESITZER&quot;, &quot;FullControl&quot;, &quot;ContainerInherit,ObjectInherit&quot;, &quot;InheritOnly&quot;, &quot;Allow&quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#&lt;/ins&gt;$o_ace4 = New-Object System.Security.Accesscontrol.FileSystemAccessRule (&quot;ERSTELLER-BESITZER&quot;, &quot;FullControl&quot;, &quot;ContainerInherit,ObjectInherit&quot;, &quot;InheritOnly&quot;, &quot;Allow&quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         $o_acl.AddAccessRule($o_ace4)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#&lt;/ins&gt;$o_acl.AddAccessRule($o_ace4)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         $o_ace5 = New-Object System.Security.Accesscontrol.FileSystemAccessRule ((&amp;quot;TESTDOMAIN\&amp;quot; + &amp;quot;Administrator&amp;quot;), &amp;quot;FullControl&amp;quot;, &amp;quot;ContainerInherit,ObjectInherit&amp;quot;, &amp;quot;none&amp;quot;, &amp;quot;Allow&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         $o_ace5 = New-Object System.Security.Accesscontrol.FileSystemAccessRule ((&amp;quot;TESTDOMAIN\&amp;quot; + &amp;quot;Administrator&amp;quot;), &amp;quot;FullControl&amp;quot;, &amp;quot;ContainerInherit,ObjectInherit&amp;quot;, &amp;quot;none&amp;quot;, &amp;quot;Allow&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         $o_acl.AddAccessRule($o_ace5)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         $o_acl.AddAccessRule($o_ace5)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l73&quot;&gt;Zeile 73:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 73:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Kommentare==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Kommentare==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;comments /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;comments /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>BLinz</name></author>
	</entry>
	<entry>
		<id>https://znil.net/index.php?title=PowerShell_Ordnern_Gruppen_zuordnen_und_Rechte_setzen&amp;diff=13673&amp;oldid=prev</id>
		<title>BLinz am 20. Juli 2023 um 11:36 Uhr</title>
		<link rel="alternate" type="text/html" href="https://znil.net/index.php?title=PowerShell_Ordnern_Gruppen_zuordnen_und_Rechte_setzen&amp;diff=13673&amp;oldid=prev"/>
		<updated>2023-07-20T11:36:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 20. Juli 2023, 13:36 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l72&quot;&gt;Zeile 72:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 72:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;----&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Kommentare==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;comments /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>BLinz</name></author>
	</entry>
	<entry>
		<id>https://znil.net/index.php?title=PowerShell_Ordnern_Gruppen_zuordnen_und_Rechte_setzen&amp;diff=13672&amp;oldid=prev</id>
		<title>BLinz: Die Seite wurde neu angelegt: „&lt;u&gt;&#039;&#039;&#039;Changelog:&#039;&#039;&#039;&lt;/u&gt; * 20.07.2023 erste Version ---- ==Problem== Ich hatte um die 100 Ordner welche per Robocopy auf einen neuen Server kopiert wurden.&lt;br&gt; Ein Ordner heißt zum Beispiel &#039;&#039;&#039;&#039;&#039;Buchhaltung&#039;&#039;&#039;&#039;&#039;.&lt;br&gt;  Buchhaltung Es gibt dazu die Active-Directory-Gruppen  Laufwerk-Buchhaltung-R  Laufwerk-Buchhaltung-RW für den Zugriff.&lt;br&gt; Gewünscht war&lt;br&gt; * Die beiden Gruppen unter &#039;&#039;&#039;&#039;&#039;Sicherheit&#039;&#039;&#039; bei den Ordner hinterlegen * die -R Gruppe nur lese…“</title>
		<link rel="alternate" type="text/html" href="https://znil.net/index.php?title=PowerShell_Ordnern_Gruppen_zuordnen_und_Rechte_setzen&amp;diff=13672&amp;oldid=prev"/>
		<updated>2023-07-20T11:36:19Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „&amp;lt;u&amp;gt;&amp;#039;&amp;#039;&amp;#039;Changelog:&amp;#039;&amp;#039;&amp;#039;&amp;lt;/u&amp;gt; * 20.07.2023 erste Version ---- ==Problem== Ich hatte um die 100 Ordner welche per Robocopy auf einen neuen Server kopiert wurden.&amp;lt;br&amp;gt; Ein Ordner heißt zum Beispiel &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Buchhaltung&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&amp;lt;br&amp;gt;  Buchhaltung Es gibt dazu die Active-Directory-Gruppen  Laufwerk-Buchhaltung-R  Laufwerk-Buchhaltung-RW für den Zugriff.&amp;lt;br&amp;gt; Gewünscht war&amp;lt;br&amp;gt; * Die beiden Gruppen unter &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Sicherheit&amp;#039;&amp;#039;&amp;#039; bei den Ordner hinterlegen * die -R Gruppe nur lese…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;u&amp;gt;&amp;#039;&amp;#039;&amp;#039;Changelog:&amp;#039;&amp;#039;&amp;#039;&amp;lt;/u&amp;gt;&lt;br /&gt;
* 20.07.2023 erste Version&lt;br /&gt;
----&lt;br /&gt;
==Problem==&lt;br /&gt;
Ich hatte um die 100 Ordner welche per Robocopy auf einen neuen Server kopiert wurden.&amp;lt;br&amp;gt;&lt;br /&gt;
Ein Ordner heißt zum Beispiel &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Buchhaltung&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
 Buchhaltung&lt;br /&gt;
Es gibt dazu die Active-Directory-Gruppen&lt;br /&gt;
 Laufwerk-Buchhaltung-R&lt;br /&gt;
 Laufwerk-Buchhaltung-RW&lt;br /&gt;
für den Zugriff.&amp;lt;br&amp;gt;&lt;br /&gt;
Gewünscht war&amp;lt;br&amp;gt;&lt;br /&gt;
* Die beiden Gruppen unter &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Sicherheit&amp;#039;&amp;#039;&amp;#039; bei den Ordner hinterlegen&lt;br /&gt;
* die -R Gruppe nur lesend&lt;br /&gt;
* die -RW Gruppen lesend und schreibend&lt;br /&gt;
* Rekursiv die Rechte neu setzen&lt;br /&gt;
----&lt;br /&gt;
==Lösung==&lt;br /&gt;
Das Skript arbeitet alle Verzeichnisse im vorgegebenen Ordner ab und sucht für jeden die passenden AD-Gruppen.&amp;lt;br&amp;gt;&lt;br /&gt;
Dann werden die Rechte auf dem Ordner alle entfernt und neu gesetzt.&amp;lt;br&amp;gt;&lt;br /&gt;
Das Skript muss auf einem System mit der installierten PowerShell-Erweiterung für Actice Directory ausgeführt werden.&amp;lt;br&amp;gt;&lt;br /&gt;
Es sollte auch mit UNC-Pfaden funktionieren.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;powershell&amp;quot;&amp;gt;&lt;br /&gt;
# Alle Verzeichnisse im Pfad abarbeiten, die AD-Gruppen dazu suchen und die Berechtigungen setzen&lt;br /&gt;
$s_CurrentPath = &amp;quot;D:\&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Liste der Ordnernamen holen&lt;br /&gt;
$a_ListFolders = Get-ChildItem -Path $s_CurrentPath -Directory -Force -ErrorAction SilentlyContinue | Select-Object Name,FullName&lt;br /&gt;
foreach($s_folder in $a_ListFolders) {&lt;br /&gt;
    if ( (-not ($s_folder.Name -like &amp;quot;*System Volume Information*&amp;quot;)) -and (-not ($s_folder.Name -like &amp;quot;*RECYCLE.BIN*&amp;quot;)) -and (-not ($s_folder.Name -like &amp;quot;*DfsRoot*&amp;quot;)) ) {&lt;br /&gt;
        $s_GroupSearch1 = &amp;quot;Laufwerk-&amp;quot; + $s_folder.Name + &amp;quot;-*&amp;quot;&lt;br /&gt;
        $s_GroupSearch2 = &amp;quot;Laufwerk-&amp;quot; + $s_folder.Name + &amp;quot;-[A-Z]-*&amp;quot;&lt;br /&gt;
        Write-Host &amp;quot;---------------------------------------------------------------------------------------&amp;quot;&lt;br /&gt;
        Write-Host &amp;quot;$s_GroupSearch1 für&amp;quot; $s_folder.FullName&lt;br /&gt;
        # Rechte des Ordners holen&lt;br /&gt;
        $o_acl = Get-Acl -Path $s_folder.FullName&lt;br /&gt;
        # Vererbung deaktivieren&lt;br /&gt;
        $o_acl.SetAccessRuleProtection($true, $false)&lt;br /&gt;
        # vorhandene Rechte entfernen&lt;br /&gt;
        $o_acl.Access | ForEach-Object { $o_acl.RemoveAccessRule($_) | Out-Null }&lt;br /&gt;
        # Administratoren hinzufügen&lt;br /&gt;
        $o_ace1 = New-Object System.Security.Accesscontrol.FileSystemAccessRule (&amp;quot;VORDEFINIERT\Administratoren&amp;quot;, &amp;quot;FullControl&amp;quot;, &amp;quot;ContainerInherit,ObjectInherit&amp;quot;, &amp;quot;none&amp;quot;, &amp;quot;Allow&amp;quot;)&lt;br /&gt;
        $o_acl.AddAccessRule($o_ace1)&lt;br /&gt;
        $o_ace2 = New-Object System.Security.Accesscontrol.FileSystemAccessRule ((&amp;quot;TESTDOMAIN\&amp;quot; + &amp;quot;Domänen-Admins&amp;quot;), &amp;quot;FullControl&amp;quot;, &amp;quot;ContainerInherit,ObjectInherit&amp;quot;, &amp;quot;none&amp;quot;, &amp;quot;Allow&amp;quot;)&lt;br /&gt;
        $o_acl.AddAccessRule($o_ace2)&lt;br /&gt;
        $o_ace3 = New-Object System.Security.Accesscontrol.FileSystemAccessRule (&amp;quot;SYSTEM&amp;quot;, &amp;quot;FullControl&amp;quot;, &amp;quot;ContainerInherit,ObjectInherit&amp;quot;, &amp;quot;none&amp;quot;, &amp;quot;Allow&amp;quot;)&lt;br /&gt;
        $o_acl.AddAccessRule($o_ace3)&lt;br /&gt;
        $o_ace4 = New-Object System.Security.Accesscontrol.FileSystemAccessRule (&amp;quot;ERSTELLER-BESITZER&amp;quot;, &amp;quot;FullControl&amp;quot;, &amp;quot;ContainerInherit,ObjectInherit&amp;quot;, &amp;quot;InheritOnly&amp;quot;, &amp;quot;Allow&amp;quot;)&lt;br /&gt;
        $o_acl.AddAccessRule($o_ace4)&lt;br /&gt;
        $o_ace5 = New-Object System.Security.Accesscontrol.FileSystemAccessRule ((&amp;quot;TESTDOMAIN\&amp;quot; + &amp;quot;Administrator&amp;quot;), &amp;quot;FullControl&amp;quot;, &amp;quot;ContainerInherit,ObjectInherit&amp;quot;, &amp;quot;none&amp;quot;, &amp;quot;Allow&amp;quot;)&lt;br /&gt;
        $o_acl.AddAccessRule($o_ace5)&lt;br /&gt;
        # Gruppen hinzufügen deren Namen zum Ordner passt&lt;br /&gt;
        $a_ListDriveGroups = Get-ADGroup -Filter &amp;#039;Name -like $s_GroupSearch1&amp;#039; | Where-Object Name -like $s_GroupSearch2 | Select-Object Name&lt;br /&gt;
        if ( $a_ListDriveGroups -eq $null ) {&lt;br /&gt;
            Write-Host $s_folder.Name + &amp;quot; hat keine Gruppe(n) im Active Directory&amp;quot;&lt;br /&gt;
        } else {&lt;br /&gt;
            foreach($DriveGroup in $a_ListDriveGroups) {&lt;br /&gt;
                Write-Host $DriveGroup.Name&lt;br /&gt;
                $s_GroupType = $DriveGroup.Name.Substring($DriveGroup.Name.Length - 2)&lt;br /&gt;
                if ( $s_GroupType -eq &amp;quot;RW&amp;quot; ) {&lt;br /&gt;
                    $o_aceDriveGroup = New-Object System.Security.Accesscontrol.FileSystemAccessRule ((&amp;quot;TESTDOMAIN\&amp;quot; + $DriveGroup.Name), &amp;quot;FullControl&amp;quot;, &amp;quot;ContainerInherit,ObjectInherit&amp;quot;, &amp;quot;none&amp;quot;, &amp;quot;Allow&amp;quot;)&lt;br /&gt;
                } else {&lt;br /&gt;
                    $o_aceDriveGroup = New-Object System.Security.Accesscontrol.FileSystemAccessRule ((&amp;quot;TESTDOMAIN\&amp;quot; + $DriveGroup.Name), &amp;quot;Read&amp;quot;, &amp;quot;ContainerInherit,ObjectInherit&amp;quot;, &amp;quot;none&amp;quot;, &amp;quot;Allow&amp;quot;)&lt;br /&gt;
                }&lt;br /&gt;
                $o_acl.AddAccessRule($o_aceDriveGroup)&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        # Rechte schreiben&lt;br /&gt;
        Set-Acl -Path $s_folder.FullName -AclObject $o_acl&lt;br /&gt;
        $o_acl = &amp;quot;&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>BLinz</name></author>
	</entry>
</feed>