Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum ProjectWise Login Report by actually Username
    • Sign In

    • State Verified Answer
    • Replies 8 replies
    • Subscribers 66 subscribers
    • Views 3062 views
    • Users 0 members are here

    ProjectWise Login Report by actually Username

    Larry Wilson
    Offline Larry Wilson over 4 years ago

    Looking for a way to get a report of the users by their actually Username.

    Select server reports by machine name only.

    Thanks for any help

    • Sign in to reply
    • Cancel

    Top Replies

    • Kevin van Haaren
      Offline Kevin van Haaren Thu, Apr 25 2019 10:12 AM in reply to Larry Wilson +1 verified
      -Month takes a number after it for the month login, there is also a -Year to specify the year. I included code to get the month from the current month. The users that are returned by the command have…
    Parents
    • Kevin van Haaren
      0 Offline Kevin van Haaren Wed, Apr 24 2019 3:09 PM

      there is Get-PWMonthlyLogins. use -Month to specify what month you are interested in.

      the get a report of the datasource, username and email address of users that logged in the previous month:

      Get-PWMonthlyLogins -Month (Get-Date).AddMonths(-1).Month | select Datasource,UserName,useremail

      But we use the hosted selectserver and the Passport Cumulative Usage report shows usernames. As does the User Report > Monthly Usage by User.

       

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Larry Wilson
      0 Offline Larry Wilson Thu, Apr 25 2019 6:53 AM in reply to Kevin van Haaren

      I'm getting a error, here is my command line. I have logged into the datasource

      Get-PWMonthlyLogins -March (Get-Date).AddMonths(-1).Month | select Datasource,UserName,useremail

      Here is the error

      Get-PWMonthlyLogins : A parameter cannot be found that matches parameter name 'March'.
      At line:1 char:21
      + Get-PWMonthlyLogins -March (Get-Date).AddMonths(-1).Month | select Da ...
      +                     ~~~~~~
          + CategoryInfo          : InvalidArgument: (:) [Get-PWMonthlyLogins], ParameterBindingException
          + FullyQualifiedErrorId : NamedParameterNotFound,PWPS_DAB.GetPWMonthlyLogins

      LARRY WILSON | Senior Designer


      Crawford, Murphy & Tilly | Engineers & Consultants
      84 Remick Blvd. | Springboro, OH  45066
       lwilson@cmtengr.com

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Larry Wilson
      0 Offline Larry Wilson Thu, Apr 25 2019 8:21 AM in reply to Kevin van Haaren

      okay, misunderstood you. So how do you specify a certain month?

      I ran the command exactly like you have it, and didn't get an error, but also didn't get any report.

      LARRY WILSON | Senior Designer


      Crawford, Murphy & Tilly | Engineers & Consultants
      84 Remick Blvd. | Springboro, OH  45066
       lwilson@cmtengr.com

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Larry Wilson
      0 Offline Larry Wilson Thu, Apr 25 2019 8:28 AM in reply to Larry Wilson

      Got the report, how do you specify the month or is just the month you are in?

      LARRY WILSON | Senior Designer


      Crawford, Murphy & Tilly | Engineers & Consultants
      84 Remick Blvd. | Springboro, OH  45066
       lwilson@cmtengr.com

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Larry Wilson
      0 Offline Larry Wilson Thu, Apr 25 2019 8:45 AM in reply to Larry Wilson

      One more question, is there a way to just get the logical logins only?

      LARRY WILSON | Senior Designer


      Crawford, Murphy & Tilly | Engineers & Consultants
      84 Remick Blvd. | Springboro, OH  45066
       lwilson@cmtengr.com

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Kevin van Haaren
      +1 Offline Kevin van Haaren Thu, Apr 25 2019 10:12 AM in reply to Larry Wilson

      -Month takes a number after it for the month login, there is also a -Year to specify the year. I included code to get the month from the current month.

      The users that are returned by the command have a property UserType that identify if they are a windows account (UserType W) or Logical account (UserType D (I don't understand why D))

      So to get a list of logical users that logged in march of this year:

      $users = Get-PWMonthlyLogins -Month 3 -Year 2019 | Where UserType -eq "D"
      write-host "$(Users.Count) users logged in"
      $users | Select Datasource,UserName,UserDescription,UserEmail

      change -Month to -Month 2 for Feburary. Change to -Month 11 -Year 2018 for November of 2018

       

      Answer Verified By: Larry Wilson 

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Reject Answer
      • Cancel
    • Larry Wilson
      0 Offline Larry Wilson Thu, Apr 25 2019 10:33 AM in reply to Kevin van Haaren

      Works great, 

      Thanks

      LARRY WILSON | Senior Designer


      Crawford, Murphy & Tilly | Engineers & Consultants
      84 Remick Blvd. | Springboro, OH  45066
       lwilson@cmtengr.com

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • Larry Wilson
      0 Offline Larry Wilson Thu, Apr 25 2019 10:33 AM in reply to Kevin van Haaren

      Works great, 

      Thanks

      LARRY WILSON | Senior Designer


      Crawford, Murphy & Tilly | Engineers & Consultants
      84 Remick Blvd. | Springboro, OH  45066
       lwilson@cmtengr.com

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    No Data

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies