<?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>Convert-PWUserToFederated example not working</title><link>https://communities.bentley.com/products/projectwise/f/projectwise-powershell-extensions-forum/232587/convert-pwusertofederated-example-not-working</link><description>from the help: Get-PWUserByMatch -Email &amp;#39;*bentley.com&amp;#39; | Convert-PWUserToFederated I figured out that: Get-PWUserByMatch is the correct cmdlet. 
 the Convert-PWUserToFederate does not like to be Piped. 
 Any suggestions greatly appreciated!!</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Convert-PWUserToFederated example not working</title><link>https://communities.bentley.com/thread/721480?ContentTypeID=1</link><pubDate>Thu, 14 Jul 2022 14:50:11 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:a4bf09a6-b8eb-4d29-8b96-3c71e73879b3</guid><dc:creator>Kevin van Haaren</dc:creator><description>&lt;p&gt;Not sure it would matter but Get-PWUser is from the PWPS module that comes with ProjectWise Administrator and Convert-PWUserToFederated is from the PWPS_DAB module. Using Get-PWUsersByMatch from PWPS_DAB instead of Get-PWUser may fix this.&lt;/p&gt;
&lt;p&gt;Both commands return objects with the same TypeName, however they differ in Properties and Methods the type has.&lt;/p&gt;
&lt;p&gt;For users returned by Get-PWUser the object is (this is from Administrator 299):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;   TypeName: Bentley.ProjectWise.PowerShell.Common.User

Name             MemberType Definition
----             ---------- ----------
Equals           Method     bool Equals(Bentley.ProjectWise.PowerShell.Common.User other), bool Equals(System.Object obj), bool Equals(Bentley.Projec...
GetAllSettings   Method     System.Collections.Generic.List[Bentley.ProjectWise.PowerShell.Common.User+UsrStng] GetAllSettings()
GetHashCode      Method     int GetHashCode()
GetType          Method     type GetType()
ToString         Method     string ToString()
CreationDate     Property   System.Nullable[datetime] CreationDate {get;}
Description      Property   string Description {get;set;}
Email            Property   string Email {get;set;}
ID               Property   int ID {get;}
Identity         Property   string Identity {get;set;}
IdentityProvider Property   string IdentityProvider {get;}
IsConnected      Property   System.Nullable[bool] IsConnected {get;}
IsDisabled       Property   System.Nullable[bool] IsDisabled {get;set;}
LastLogin        Property   System.Nullable[datetime] LastLogin {get;}
Name             Property   string Name {get;set;}
SecProvider      Property   string SecProvider {get;set;}
Settings         Property   Bentley.ProjectWise.PowerShell.Common.User+UserSettings2 Settings {get;set;}
Type             Property   Bentley.ProjectWise.PowerShell.Common.UserType Type {get;set;}
UserId           Property   int UserId {get;}
UserName         Property   string UserName {get;set;}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;For users returned by Get-PWUsersByMatch the object is (from pwps_dab 2.1.7.0):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;   TypeName: Bentley.ProjectWise.PowerShell.Common.User

Name              MemberType Definition
----              ---------- ----------
Equals            Method     bool Equals(System.Object obj)
GetHashCode       Method     int GetHashCode()
GetLastLogin      Method     System.Nullable[datetime] GetLastLogin()
GetType           Method     type GetType()
GroupsMemberOf    Method     System.Collections.Generic.SortedList[int,string] GroupsMemberOf()
ToString          Method     string ToString()
UserListsMemberOf Method     System.Collections.Generic.SortedList[int,string] UserListsMemberOf()
CreationDate      Property   System.Nullable[datetime] CreationDate {get;}
Description       Property   string Description {get;set;}
Disabled          Property   bool Disabled {get;set;}
Email             Property   string Email {get;set;}
ID                Property   int ID {get;}
Identity          Property   string Identity {get;set;}
IdentityProvider  Property   string IdentityProvider {get;set;}
IsConnected       Property   bool IsConnected {get;}
IsDisabled        Property   bool IsDisabled {get;set;}
LastLogin         Property   System.Nullable[datetime] LastLogin {get;}
Name              Property   string Name {get;}
SecProvider       Property   string SecProvider {get;set;}
Type              Property   Bentley.ProjectWise.PowerShell.Common.UserType Type {get;set;}
UserID            Property   int UserID {get;}
UserName          Property   string UserName {get;}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Convert-PWUserToFederated example not working</title><link>https://communities.bentley.com/thread/721323?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2022 21:16:28 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:d3a63d67-15ff-4433-8a50-073c2a43d661</guid><dc:creator>Matt Kovach</dc:creator><description>&lt;p&gt;Hello Mike,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve not used this cmdlet before. However, it seems like this should work (based on the Help information):&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="powershell"&gt;# Get ProjectWise Users.
$ProjectWiseUsers = Get-PWUserByMatch -Email &amp;#39;*bentley.com&amp;#39;

# Loop through each ProjectWise User in ProjectWise Users Array.
ForEach ($ProjectWiseUser in $ProjectWiseUsers)
    {
        # Convert ProjectWise User to Federated Type.
        Convert-PWUserToFederated -InputUser $ProjectWiseUser
    }
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>