Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Get-PWDocumentsBySearch : Not logged in as a ProjectWise Administrator.
    • Sign In

    • State Verified Answer
    • Replies 25 replies
    • Answers 3 answers
    • Subscribers 70 subscribers
    • Views 7251 views
    • Users 0 members are here

    Get-PWDocumentsBySearch : Not logged in as a ProjectWise Administrator.

    Gavin Chapman
    Offline Gavin Chapman over 5 years ago

    When running a simple 'Get-PWDocumentsBySearch' command
    $Docs = Get-PWDocumentsBySearch -SearchName "$ProjectFolderPath\$pdfSearchName" -filename '%.pdf' -GetAttributes

    I now get an error, which I never used to get before
    Get-PWDocumentsBySearch : Not logged in as a ProjectWise Administrator.

    I am using the Open-PWConnection method because I don't want to use an administrator login -Admin parameter, the New-PWLogin method requires an administrator login and I don't want to use the GUI because this is on an automatic scheduled task.

    ModuleType Version    Name
    ---------- -------    ----
    Binary     1.5.5.0    PWPS_DAB

    Any assistance will be greatly appreciated
    Kind regards Gavin Chapman

    • Sign in to reply
    • Cancel

    Top Replies

    • John Story
      Offline John Story Mon, May 14 2018 8:27 AM in reply to Gavin Chapman +4
      I hope this is a typo or requires some other context... Similarly, for PWPS_DAB we use a "Service" account that is granted elevated rights to given Projects on a Project by Project basis, and it is definitely…
    • Duncan Taylor
      Offline Duncan Taylor Tue, May 15 2018 8:32 AM in reply to John Story +3
      A ditto for me. This will result in the PowerShell functions becoming absolutely useless. I am using PowerShell to produce dashboard reports from ProjectWise data (which are not available from Project…
    • Gavin Chapman
      Offline Gavin Chapman Mon, May 14 2018 5:58 AM in reply to Brian Flaherty +2
      Hi Brian We have a 'Batch' user account that we use for certain automated tasks, these automated tasks manipulate data in one way or another, this account doesn't have admin rights and for certain reasons…
    Parents
    • Dave Brumbaugh
      +1 Offline Dave Brumbaugh Wed, May 30 2018 4:44 PM

      See version 1.5.9.0 just posted. You can now login with New-PWLogin and use the cmdlets with a non-admin user who is a member of a group called PowerShell Users.

      $encryptedPassword = Read-Host -Prompt "Enter Password:" -AsSecureString
      New-PWLogin Naou22468a:PW_GAS_PRD -UserName PowerShellUser -Password $encryptedPassword -NonAdminLogin

      Think I finally understood what you guys were asking for: the ability to do bulk processing against a datasource that may not be your own.  Did not even occur to me...

      Anyway.  Hope that helps.  Added Sqlite support for 64-bit, too.

      Dave

      Answer Verified By: Gavin Chapman 

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Reject Answer
      • Cancel
    • Jacob S
      0 Offline Jacob S Wed, Oct 2 2019 4:05 AM in reply to Dave Brumbaugh

      This does not help as the datasource admin might not even be allowed (due to outdated company policy) to add a user into that specific group. 
      There must be a way to log in to a data source with the EXACT same privileges as you would have if that user logs in using the Explorer desktop app.
       
      We have been using the cmdlets for years in our projects, just to get the data from our clients (so yeah, external sources and completely unable to make requests for group membership) down to our servers, and have it synced. Since we don’t want nor need to work in a PW environment. 
      As for now, we are stuck with the older versions of PWP_DAB. Next step is to abandon it and use tools like AutoIT/AHK.
      I mean, how did you not even think of this scenario? Just think of any possible way ProjectWise could be used. Especially for a repetitive task (more than one time in a week/month). It is not like that every single ProjectWise user is admin, true admin usage would only represent a small percentage of a total usage in a project.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Dave Brumbaugh
      0 Offline Dave Brumbaugh Wed, Oct 2 2019 9:25 AM in reply to Jacob S

      Why are you stuck with an older version? The PowerShell Users group is our workaround for not requiring an admin login. I know Open-PWConnection is also less restrictive though it is limited to 32-bit.

      Would adding support for a User List called PowerShell Users in addition to the Group be sufficient? I wouldn't have any problem with that, but we won't support the "any user can use PWPS_DAB" for the reasons stated above. There will always be restrictions.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • Cancel
    • Bill Graefe
      0 Offline Bill Graefe Thu, Oct 3 2019 3:37 PM in reply to Jacob S

      Could you set up user machines with scheduled tasks that run as a tightly controlled domain user that access a tightly controlled local file with the encrypted password file for a PW service account? (the file is unique to that user and machine executing the PS). You can set up tasks to be executable by non-admins.

      I think you could even set up a PS API that securely sends the password to a running process provided it's accessed by that domain account.

      Bill

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Kevin van Haaren
      0 Offline Kevin van Haaren Thu, Oct 3 2019 10:26 PM in reply to Bill Graefe

      If they're logging into external sources at other companies this won't work, the external company controls the account you login with.

      as someone wit a system with a lot of external users I would not add them to a PowerShell Users list as is.

      if a separate client only tool with a separate user group/list controlling it I would consider it. a client with only file/folder operations (no acl cmdlets).

       

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • Kevin van Haaren
      0 Offline Kevin van Haaren Thu, Oct 3 2019 10:26 PM in reply to Bill Graefe

      If they're logging into external sources at other companies this won't work, the external company controls the account you login with.

      as someone wit a system with a lot of external users I would not add them to a PowerShell Users list as is.

      if a separate client only tool with a separate user group/list controlling it I would consider it. a client with only file/folder operations (no acl cmdlets).

       

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    • Dave Brumbaugh
      0 Offline Dave Brumbaugh Thu, Oct 10 2019 12:54 PM in reply to Kevin van Haaren

      In v 1.14.0.0, we have added a "Report Mode" login. This is a login by a user that is not an admin and not a restricted admin and not in the PowerShell Users group. This user only has the rights to run a certain subset of cmdlets mostly related to reporting. The rule of thumb used to enable cmdlets for use by the "Report Mode" user was that they be read-only, reporting related cmdlets that were not security related with more than 10,000 executions as reported by Get-PWCmdletStatistics. This was just released. We welcome your feedback. I hope this meets your needs. Happy to consider suggestions for adding or removing cmdlets from the Report Mode list.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject 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