With this latest version of the PWPS_DAB module (version 22.214.171.124) we have incorporated methods into some of the ProjectWise objects; Users, Groups, UserLists, and Workflows. Using methods allows you to get additional information related to the particular object quickly without calling other cmdlets. We will look at each of the various objects.
Lets take a look at the ProjectWise User object first.
There are three new methods available with the ProjectWise User object.
# Use Get-Member and only display the available methods.
Get-PWUsersByMatch | Get-Member | Where-Object MemberType -ieq 'method'
Get Project User Object
Lets select a user to test with.
# Get User object
$pwUser = Get-PWUsersByMatch -UserName ‘brian.flaherty‘
Get Last Login Date / Time
The GetLastLogin will return the last date and time the selected ProjectWise User has logged in.
You can see in the following image when the user last logged in.
List Group / UserList Membership
Now lets look at the membership methods.
The first will return a list containing all of the groups in which the user is a member of.
The second will return a list containing all of the user lists in which the user is a member of.
The following shows the available methods for a ProjectWise Group Object.
Using the GetMembers method will return an array of User Objects.
The following shows the members of the group selected.
The following shows the available methods for a ProjectWise UserList Object.
Using the GetMembers method will return an array of User / Group / UserList Objects.
The following shows the members of the userlist selected.
The following shows the available methods for a ProjectWise Workflow Object.
Using the GetStates method will return an array of ProjectWise State Objects which are associated with the specified workflow.
The following shows the States associated with the Workflow selected.
Experiment with it and have fun.
Hopefully, you find this useful. Please let me know if you have any questions or comments. If you like this post, please click the Like button at the bottom of the page.