<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/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>How to add users to a group using PW PowerShell</title><link>https://communities.bentley.com/products/projectwise/f/projectwise-powershell-extensions-forum/184908/how-to-add-users-to-a-group-using-pw-powershell</link><description>can i have a sample on how to add users to a group using PW PowerShell? 
 
 i have an empty group in in PW Administrator called &amp;quot;09Cont_Improvement&amp;quot; i need to add 150 users to this group 
 
 is there a cmlet to add users to this group in a easy way? </description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to add users to a group using PW PowerShell</title><link>https://communities.bentley.com/thread/682920?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2021 05:47:30 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:de20fd30-4ad4-4f38-9abf-c984cd5da248</guid><dc:creator>Aniruddh Chavan</dc:creator><description>&lt;p&gt;if you can put each email id in text file, one per line [without blank spaces] you can do:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="powershell"&gt;cls

New-PWLogin -UseGui -Verbose

$Users = Get-Content -Path &amp;#39;path/to/file/users.txt&amp;#39;

Get-PWUsersByMatch -Email $Users | Add-PWUserToGroup -GroupName &amp;#39;Group Name&amp;#39; -Verbose

Undo-PWLogin -Verbose&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add users to a group using PW PowerShell</title><link>https://communities.bentley.com/thread/682315?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 15:21:34 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:eb32474d-f882-4797-bd3a-40b0877d5152</guid><dc:creator>Brian Flaherty</dc:creator><description>&lt;p&gt;You could import the data from you excel/csv file and loop through each entry adding the user to a group/userlist.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add users to a group using PW PowerShell</title><link>https://communities.bentley.com/thread/682279?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 13:04:27 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2f06dece-64ec-427e-8343-3be69fe793d5</guid><dc:creator>Devendra Wagh</dc:creator><description>&lt;p&gt;Miroslav,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If I wanted to add multiple users to projectwise using powershell, let say using excel\CSV file, do we have a code\cmdlet for that ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add users to a group using PW PowerShell</title><link>https://communities.bentley.com/thread/542315?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2019 15:49:16 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:df6dd7de-898c-4193-946d-6f488a2895cf</guid><dc:creator>Brian Flaherty</dc:creator><description>&lt;p&gt;Get-Help New-PWLogin -Full&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add users to a group using PW PowerShell</title><link>https://communities.bentley.com/thread/541763?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 22:52:46 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:1be1160a-4bfa-4ae9-bb71-dfefe3e662fe</guid><dc:creator>Juan Garcia</dc:creator><description>&lt;p&gt;Thanks Miroslav,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now&amp;nbsp;I get this error when i try to run the CMLET.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When&amp;nbsp;I run this cmlet i get this error.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CMLET&lt;/strong&gt; - Add-PWUserToGroup -GroupName &lt;strong&gt;&lt;em&gt;&amp;quot;GroupName&amp;quot;&lt;/em&gt;&lt;/strong&gt; -UserName &lt;strong&gt;&lt;em&gt;&amp;quot;Username&amp;quot;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;ERROR&lt;/strong&gt; - Changed ThreadOptions to ReuseThread&lt;br /&gt;Add-PWUserToGroup : Not logged into a ProjectWise datasource.&lt;br /&gt;At line:1 char:1&lt;br /&gt;+ Add-PWUserToGroup -GroupName &amp;quot;&lt;strong&gt;GroupName&lt;/strong&gt;...&lt;br /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + CategoryInfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : NotSpecified: (:) [Add-PWUserToGroup], Exception&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + FullyQualifiedErrorId : System.Exception,PWPS_DAB.AddPWUserToGroup&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;PS C:\Windows\system32&amp;gt; Error: One or more errors occurred.&lt;br /&gt;&amp;nbsp;&amp;nbsp; at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at System.Threading.Tasks.Task`1.get_Result()&lt;br /&gt;&amp;nbsp;&amp;nbsp; at PWPS_DAB.Utility.SendInfoToWebService(Object args)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;How do i login to ProjectWise data source from ProjectWise PowerShell and see if that corrects this error?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Thank you&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add users to a group using PW PowerShell</title><link>https://communities.bentley.com/thread/541560?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 06:21:40 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:9a341664-6711-4626-a831-18d8140dea47</guid><dc:creator>Miroslav Matas</dc:creator><description>&lt;p&gt;Add-PWUserToGroup -GroupName &amp;quot;09Cont_Improvement&amp;quot; -UserName &amp;quot;miroslav.matas&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>