Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Using Get-PWDocumentsBySearch to locate files by Property values
    • Sign In

    • State Verified Answer
    • Replies 3 replies
    • Subscribers 67 subscribers
    • Views 2422 views
    • Users 0 members are here
    • Get-DocumentBySearch
    • Properties

    Using Get-PWDocumentsBySearch to locate files by Property values

    Robert Biggar
    Offline Robert Biggar over 6 years ago

    I am trying to find a way to locate all the files in my datasource that are associated with a defunct application and associate them with a "new" application. I have not been able to find a way to search on files based on their property values  - such as "Application", "Status", "Workflow" etc. Has anyone done this a bunch and can point me in the right direction?  Thank You!

    • Sign in to reply
    • Cancel
    • Jdgooldy1980
      0 Offline Jdgooldy1980 Thu, Apr 19 2018 1:23 PM in reply to Robert Biggar

      Don't know if you have seen this cmdlet but this should get you to the application association

      $application = "Microsoft Word"

      #set the document application assoication

      Set-PWDocumentApplication -InputDocuments $docs -Application $application -Verbose

       

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Robert Biggar
      0 Offline Robert Biggar Thu, May 25 2017 2:01 PM in reply to Paul Patterson
      yep. that worked. Thank You!

      added a "Global" search named "Microstation7"
      Then accessed it: Get-PWDocumentsBySearch -SearchName "Microstation7"

      Still looking for a way to change "Application"

      Update-PWDocumentProperties - "allows you to reset the document name, description, file name or
      version string"
      Update-PWDOcumentAttributes - changes the "document attribute record" - which works for the custom attributes

      ...any Idea how you get to "Applicaton" or "Status"..etc.?

      Thanks
      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Paul Patterson
      0 Offline Paul Patterson Thu, May 25 2017 8:02 AM
      How about setting up a saved search in the datasource, and then using the cmdlet to return the files via the saved search?

      Answer Verified By: Robert Biggar 

      • 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