Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Updating Workflow inheritance with Powershell
    • Sign In

    • State Not Answered
    • Replies 7 replies
    • Subscribers 64 subscribers
    • Views 2610 views
    • Users 0 members are here

    Updating Workflow inheritance with Powershell

    D.Widdifield
    Offline D.Widdifield over 5 years ago

    I have a project folder with a workflow where the inheritance on each state of the workflow is Inherited from: none. I wish to reset this to Inherited from: global permissions. I have many projects where this is incorrect due to a mis-configured template. What I am looking to do is basically delete the user list assignments of each state of the workflow on the folder so that the security flips to the global. 

    I have used the following to play with the security but I am unable to remove the userlist which is really what I want to do. 

    Update-PWFolderSecurity -InputFolder $inputfolder -MemberName $userlist -MemberType ul -DocumentSecurity -FolderSecurity -StateName $StateName -WorkFlowName $Workflow

    Is there a cmdlet or combination there of that would allow me to do this? 

    dave

    • Sign in to reply
    • Cancel
    Parents
    • Brian Flaherty
      0 Offline Brian Flaherty Fri, Apr 20 2018 11:11 AM

      Have you looked at the Remove-PWFolderSecurity cmdlet? You can supply a workflow and statename.
      Get-Help Remove-PWFolderSecurity -Full

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • D.Widdifield
      0 Offline D.Widdifield Mon, Apr 23 2018 10:34 AM in reply to Brian Flaherty

      This cmdlet does not have the option of workflow or statename, only inputfolder, membername and membertype. 

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Brian Flaherty
      0 Offline Brian Flaherty Sun, Apr 29 2018 11:56 PM in reply to D.Widdifield

      Ensure you are running the latest version of the PWPS_DAB module.

      From within PowerShell enter:

      Update-Module PWPS_DAB

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • D.Widdifield
      0 Offline D.Widdifield Tue, May 1 2018 3:37 PM in reply to Brian Flaherty

      It appears my problem was number of versions, as I was running the latest 1.5.3.0, but I also had about a dozen earlier ones. I removed allversions and then reinstalled it. I don't see this old cmdlet but I see a new one Remove-MyFolderSecurity. Which looks like this should do it. Never a dull moment! Will play tomorrow and confirm this one. Thanks for the hint of looking at the version.

      d

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Brian Flaherty
      0 Offline Brian Flaherty Tue, May 1 2018 7:14 PM in reply to D.Widdifield

      Oops, it should be Remove-PWFolderSecurity. That will be updated in the next release of PWPS_DAB.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • D.Widdifield
      0 Offline D.Widdifield Wed, May 2 2018 9:10 AM in reply to Brian Flaherty

      hahaha...SO I AM NOT LOSING MY MIND!!! 

      Thanks Brian, much appreciated. I will be patiently waiting.

      d

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • D.Widdifield
      0 Offline D.Widdifield Wed, May 2 2018 11:29 AM in reply to Brian Flaherty

      Hi Brian. I went ahead and tested this new cmdlet that I am seeing on a freshly installed 1.5.3.0. It works. The Remove-PWFolderSecurity cmdlet does not exist, but I have this new Remove-MyFolderSecurity which does exactly what I want. Appears this is a naming mistake. 

      Remove-MyFolderSecurity -InputFolder $i -MemberType g -DocumentSecurity -FolderSecurity -MemberName $g1 -StateName $s1 -WorkflowName $wf1

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • D.Widdifield
      0 Offline D.Widdifield Wed, May 2 2018 11:29 AM in reply to Brian Flaherty

      Hi Brian. I went ahead and tested this new cmdlet that I am seeing on a freshly installed 1.5.3.0. It works. The Remove-PWFolderSecurity cmdlet does not exist, but I have this new Remove-MyFolderSecurity which does exactly what I want. Appears this is a naming mistake. 

      Remove-MyFolderSecurity -InputFolder $i -MemberType g -DocumentSecurity -FolderSecurity -MemberName $g1 -StateName $s1 -WorkflowName $wf1

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    No Data

    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