<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Use PowerShell to Add Domain Users to a Local Group</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/08/19/use-powershell-to-add-domain-users-to-a-local-group.aspx</link><description>Summary : By using Windows PowerShell splatting, domain users can be added to a local group. This script includes a function to convert a CSV file to a hash table. 
 
 Hey, Scripting Guy! I need to be able to use Windows PowerShell to add domain users</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Use PowerShell to Add Domain Users to a Local Group</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/08/19/use-powershell-to-add-domain-users-to-a-local-group.aspx#3503409</link><pubDate>Tue, 12 Jun 2012 13:52:31 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3503409</guid><dc:creator>Ed Wilson</dc:creator><description>&lt;p&gt;@Jason this script does not handle credentials. It impersonates the logged on user. If you need to use alternate credentials then you will need to right click on PowerShell and use runas to supply the credentials required.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3503409" width="1" height="1"&gt;</description></item><item><title>re: Use PowerShell to Add Domain Users to a Local Group</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/08/19/use-powershell-to-add-domain-users-to-a-local-group.aspx#3503270</link><pubDate>Mon, 11 Jun 2012 21:08:58 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3503270</guid><dc:creator>Jason</dc:creator><description>&lt;p&gt;Does this work when you run the script as a local administrator account? How do credentials to access the AD get passed through?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3503270" width="1" height="1"&gt;</description></item><item><title>re: Use PowerShell to Add Domain Users to a Local Group</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/08/19/use-powershell-to-add-domain-users-to-a-local-group.aspx#3429021</link><pubDate>Fri, 13 May 2011 13:39:05 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3429021</guid><dc:creator>Jim</dc:creator><description>&lt;p&gt;I found the answer.&lt;/p&gt;
&lt;p&gt;PS C:\Users\Administrator&amp;gt; $LocalGroup = &amp;quot;Administrators&amp;quot;&lt;/p&gt;
&lt;p&gt;PS C:\Users\Administrator&amp;gt; $DomainGroup = &amp;quot;MY-ADMIN-GROUP&amp;quot;&lt;/p&gt;
&lt;p&gt;PS C:\Users\Administrator&amp;gt; ([ADSI]&amp;quot;WinNT://./$LocalGroup,group&amp;quot;).Add(&amp;quot;WinNT://ads.iu.edu/$DomainGroup&amp;quot;)&lt;/p&gt;
&lt;p&gt;PS C:\Users\Administrator&amp;gt; &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3429021" width="1" height="1"&gt;</description></item><item><title>re: Use PowerShell to Add Domain Users to a Local Group</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/08/19/use-powershell-to-add-domain-users-to-a-local-group.aspx#3424672</link><pubDate>Wed, 27 Apr 2011 15:13:08 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3424672</guid><dc:creator>Jim</dc:creator><description>&lt;p&gt;This isn&amp;#39;t working for me. Any ideas?&lt;/p&gt;
&lt;p&gt;PS C:\Users\Administrator&amp;gt; $LocalGroup = &amp;quot;Administrators&amp;quot;&lt;/p&gt;
&lt;p&gt;PS C:\Users\Administrator&amp;gt; $DomainGroup = &amp;quot;MY-ADMIN-GROUP&amp;quot;&lt;/p&gt;
&lt;p&gt;PS C:\Users\Administrator&amp;gt; $de = [ADSI]&amp;quot;WinNT://./$LocalGroup,group&amp;quot;&lt;/p&gt;
&lt;p&gt;PS C:\Users\Administrator&amp;gt; $de.psbase.Invoke(&amp;quot;Add&amp;quot;,([ADSI]&amp;quot;WinNT://domain.company.com/$DomainGroup&amp;quot;).path)&lt;/p&gt;
&lt;p&gt;Exception calling &amp;quot;Invoke&amp;quot; with &amp;quot;2&amp;quot; argument(s): &amp;quot;Number of parameters specified does not match the expected number.&amp;quot;&lt;/p&gt;
&lt;p&gt;At line:1 char:18&lt;/p&gt;
&lt;p&gt;+ $de.psbase.Invoke &amp;lt;&amp;lt;&amp;lt;&amp;lt; &amp;lt;&amp;quot;Add&amp;quot;,([ADSI]&amp;quot;WinNT://domain.company.com/$DomainGroup&amp;quot;).path)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;+ CategoryInfo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: NotSpecified: (:) [], MethodInvocationException&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;+ FullyQualifiedErrorId : DotNetMethodTargetInvocation&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3424672" width="1" height="1"&gt;</description></item></channel></rss>