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
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?
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?
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?
Please close ProjectWise Administrator, re-open it, log into the same datasource and confirm whether the changes are made.
Mark Weisman | Bentley Systems
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 box what was once labeled 'Document' (see previous screenshot) is now 'Folder'.
Answer Verified By: Richard Gibbons