Be sure to check out my Scripting4Crypto initiative. It’s a fun way to get into using cryptocurrencies all while getting your PowerShell needs met.
There are multiple ways for a user to log into ProjectWise using the PWPS_DAB PowerShell module. First thing you should always do is look at the available Help information for a cmdlet to learn what it’s used for and to get examples on how to use it. The following will return the help the New-PWLogin cmdlet.
From within PowerShell, type:
Get-Help New-PWLogin -Full
If you run the New-PWLogin cmdlet without any parameters or include the -UseGui, to display the ProjectWise Login dialog.
New-PWLogin -UseGui -Verbose
If you provide the ProjectWise Datasource name ONLY, the cmdlet will attempt to log into the provided ProjectWise Datasource using single sign-on, with the current user’s credentials.
NOTE: The Datasource format is SERVER:DATASOURCENAME
New-PWLogin -Datasource ‘MyServer:PWDatasource’ -Verbose
You can also provide the UserName and Password of the ProjectWise user account you would like to connect with.
NOTE: The password will need to be converted to a SecureString prior to passing to the New-PWLogin cmdlet.
New-PWLogin -Datasource ‘MyServer:PWDatasource’ -UserName ‘UserName’-Password (Read-Host -Prompt “Enter Password” -AsSecureString) -Verbose
You can log into a ProjectWise Datasource using a Federated user account.
NOTE: To use this functionality, the Bentley Connection Client is required.
New-PWLogin -BentleyIMS -Verbose
Typically, in order to use any of the PWPS_DAB cmdlets, the user account being used must be a member of the ProjectWise Administrator group. However, there are some instances where a non-adminstrator user account must be used. The -NonAdminLogin switch parameter has been added to accomplish this.
NOTE: Login as a non-admin user. User must be member of “PowerShell Users” group in the datasource.
New-PWLogin -Datasource ‘MyServer:PWDatasource’ -NonAdminLogin -Verbose
New-PWLogin -Datasource ‘MyServer:PWDatasource’ -UserName ‘UserName’-Password (Read-Host -Prompt “Enter Password” -AsSecureString) -NonAdminLogin -Verbose
New-PWLogin -BentleyIMS -NonAdminLogin -Verbose
There are a couple more parameters available with the New-PWLogin cmdlet:
-DoNotCreateWorkingDirectory <SwitchParameter> – Do not create working directory
-LoadWRE <SwitchParameter> – Load Workflow Rules Engine
4 thoughts on “How To: Log Into ProjectWise”
Is it possible to use SSO in a command? Now we have to use -UseGui every time? Is an new Option -UseSSO a possibility
Try providing the datasource name only. This should attempt to log you in using Single SignOn. If it can’t the PW log in dialog will display. Hope this helps.
Hi, thanks but it does not help:
“New-PWLogin -DatasourceName PWAccept -NonAdminLogin”
“WARNING: Can’t get token
WARNING: Could not retrieve token
WARNING: Error logging in to ‘PWAccept’ 58000.
WARNING: Attempting to use token ”
I am not a admin but a powershell-group user
I would suggest posting your question to the Bentley Communities – PowerShell site.