Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Change the rendition profile on several folders with the same name at once with Set-PWFolderRenditionProfile?
    • Sign In

    • State Verified Answer
    • Replies 6 replies
    • Answers 1 answer
    • Subscribers 67 subscribers
    • Views 1923 views
    • Users 0 members are here
    • powershell
    • Set-PWFolderRenditionProfile

    Change the rendition profile on several folders with the same name at once with Set-PWFolderRenditionProfile?

    Erik Holmqvist
    Offline Erik Holmqvist over 5 years ago

    Tried to change to rendition profile for several folders with a powershell script but with no success. 

    Tried something very similar to what I have for changing several views at once, which looks like this:

    ## IMPORT PWPS_DAB.DLL
    Import-Module -Name "PWPS_DAB" -DisableNameChecking
    
    ## Choose folder and its subfolder which it searching in
    $TargetFolder = "Project\"
    
    ## Specify which folder that you want to change view
    $ThisFolder = "Drawings"
    
    
    ## Choose which view you want to change to
    $ThisView = "Ritningsvy"
    
    ############################################ SCRIPT ############################################################
    New-PWLogin -UseGui 
    $Folders = get-pwfolders -folderpath $TargetFolder -Slow | where-object -Property "Name" -Like -Value $ThisFolder
    $Folders | Set-PWFolderView -View $ThisView
    ############################################ SCRIPT ############################################################
    
    ## Logging out
    Undo-PWLogin

    Is it possible to do something similar with Set-PWFolderRenditionProfile?

    Thanks!

    • Sign in to reply
    • Cancel

    Top Replies

    • Brian Flaherty
      Offline Brian Flaherty Thu, Mar 22 2018 2:28 PM +3 suggested
      I have updated each of the rendition cmdlets to accept inputfolders from the pipeline. Get-PWFolderRenditionProfile, Set-PWFolderRenditionProfile and Remove-PWFolderRenditionProfile. Look for them in…
    • Brian Flaherty
      Offline Brian Flaherty Thu, Mar 22 2018 11:43 AM +1
      Currently, the Set-PWFolderRenditionProfile does not accept pipeline input. This can be added. Look for it in a future release of the PWPS_DAB module. At this point, you could use a foreach loop to apply…
    • Kevin van Haaren
      Offline Kevin van Haaren Thu, Mar 22 2018 2:10 PM +1 verified
      this worked for me. I changed up some things to my own preferences # allow -vebose/-debug parameters [CmdletBinding()] param() Import-Module -Name "PWPS_DAB" -DisableNameChecking ## Choose folder…

    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