Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum ProjectWise PowerShell Update-PWUserSetting doesn't appear to update user
    • Sign In

    • State Verified Answer
    • Replies 6 replies
    • Subscribers 65 subscribers
    • Views 378 views
    • Users 0 members are here

    ProjectWise PowerShell Update-PWUserSetting doesn't appear to update user

    Richard Gibbons
    Offline Richard Gibbons 3 months ago

    I am working on a script for creating users and have run into a strange issue. My script calls for updates to a user and when run it confirms that it works with -verbose tag, but the dialog box doesn't reflect the change. Running a Get-PWUserSettingByUser confirms that the change is made.

    I have logged out of Bentley completely and logged back in to confirm that these settings are accurate.

    Here's the part of my script for reference:

    $users = Get-PWUsersByMatch -Email $Email -verbose
    Set-PWUserIdentity -users $users -Identity $email -verbose
    
    Update-PWUserSetting -InputUsers $Users -SettingName Doc_CanModify $true -verbose
    Update-PWUserSetting -InputUsers $Users -SettingName Doc_CanDelete $false -verbose
    Update-PWUserSetting -InputUsers $Users -SettingName Doc_UseLocalRecycleBinOnFree $false -verbose

    • Sign in to reply
    • Cancel

    Top Replies

    • Richard Gibbons
      Offline Richard Gibbons Thu, May 25 2023 10:06 AM in reply to MWBSI +2 verified
      Found the issue. There was a version mismatch between my ProjectWise Explorer and ProjectWise Admin. I reinstalled them both to version 10.00.03.334 and now the settings match up. In the settings dialog…
    • Kevin van Haaren
      Offline Kevin van Haaren Wed, May 24 2023 11:18 AM +1
      I tested your script as written (for the Doc_CanDelete setting at least) and it works for me. What version of PWPS_DAB are you using? Are you logging into the datasource with an admin account?
    • Kevin van Haaren
      Offline Kevin van Haaren Wed, May 24 2023 6:23 PM in reply to Richard Gibbons +1
      Yes, if you can create a user then you can change it's settings too. Full admin I knew this was true for, but I also tested for a Restricted admin and I could change settings for users I created with that…
    Parents
    • Kevin van Haaren
      0 Offline Kevin van Haaren Wed, May 24 2023 11:18 AM

      I tested your script as written (for the Doc_CanDelete setting at least) and it works for me. What version of PWPS_DAB are you using? Are you logging into the datasource with an admin account?

       

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • Kevin van Haaren
      0 Offline Kevin van Haaren Wed, May 24 2023 11:18 AM

      I tested your script as written (for the Doc_CanDelete setting at least) and it works for me. What version of PWPS_DAB are you using? Are you logging into the datasource with an admin account?

       

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    • Richard Gibbons
      0 Offline Richard Gibbons Wed, May 24 2023 11:27 AM in reply to Kevin van Haaren

      I'm using pwps_dab version 23.1.8.0 and do have administrative privileges.

      Edit: Just being able to create a user should give me enough access to edit those settings shouldn't it? Is there a specific Admin toggle that allows an administrator to change those settings?

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Kevin van Haaren
      0 Offline Kevin van Haaren Wed, May 24 2023 6:23 PM in reply to Richard Gibbons

      Yes, if you can create a user then you can change it's settings too. Full admin I knew this was true for, but I also tested for a Restricted admin and I could change settings for users I created with that test account. I tested both via ProjectWise admin and via powershell and both worked.

      The only thing I can think of now is: Are you sure your powershell is logging into the same datasource you're looking at in admin?

       

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel

    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