Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum get-pwfolderSecurity returns extreme number of entries
    • Sign In

    • State Suggested Answer
    • Replies 8 replies
    • Answers 1 answer
    • Subscribers 66 subscribers
    • Views 943 views
    • Users 0 members are here

    get-pwfolderSecurity returns extreme number of entries

    Robert Biggar
    Offline Robert Biggar over 1 year ago

    I ran “Get-PWFolderSecurity” on a folder under my own test area… 

    it only has a couple folder security entries and a couple Document security entries.

    The CMDlet returned 3,161 records and took ~17 minutes to execute

    3100 records seems extreme to me…

    what should I expect for a number of  returns? any insight?

    Thanks.

    Bob

    • Sign in to reply
    • Cancel
    Parents
    • Brandon Williams
      0 Offline Brandon Williams Wed, Feb 16 2022 12:54 PM

      Question, did you use Get-PWFolders -FolderPath $path -JustOne ? Its possible it returned subfolder security if you didnt use the -JustOne parameter

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Robert Biggar
      0 Offline Robert Biggar Wed, Feb 16 2022 3:01 PM in reply to Brandon Williams

      Good thought...this is what I used:

      $SecTable = get-pwfolders -FolderID $Lp -JustOne -Slow | Get-PWFolderSecurity 

      Have you used this CMDlet on your system?

      How long does it usually take for you?

      and how many records does it return?

      We have an enormous ACL list... and we have had speed issues - which we attributed to a bloated table...but when this returned 3100 records...It seemed odd to me...but I don't have anything to compare it to

      Thanks Brandon!

      Bob 

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Brandon Williams
      0 Offline Brandon Williams Wed, Feb 16 2022 5:36 PM in reply to Robert Biggar

      You know what, now that I think about it, I tried this cmdlet in the past and it was not doing what I wanted. I ended up using something like this.

      Export-PWProjectAccessControl -FolderPath $Path | Format-Table

      This spit out what I wanted and I was able to manipulate it better.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • Cancel
    • Robert Biggar
      0 Offline Robert Biggar Thu, Feb 17 2022 7:49 AM in reply to Brandon Williams

      Good Idea.

      I tried this:

      Export-PWProjectAccessControl -Folderid $lp | Format-Table...

      It is slow, but it gives me much better output:

      ProjectName SecurityType Type Name Access_Control_Settings Workflow State InheritingFrom FullPath          ParentProjectName
      -----------         ------------ ---- ---- ----------------------- -------- ----- --------------  --------                                                              -----------------
      SecTest         Project                                                                                 Lansing Support\biggarr SecTest                      SecTest
      SecTest         Document                                                                            Lansing Support\biggarr SecTest                       SecTest
      test123          Project                                                                                 Lansing Support\biggarr SecTest\test123          SecTest
      test123          Document                                                                            Lansing Support\biggarr SecTest\test123          SecTest

      missing some columns... but certainly more of what I expected....

      Thanks Brandon, this is a big help!

      Bob

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Robert Biggar
      0 Offline Robert Biggar Thu, Feb 17 2022 8:52 AM in reply to Robert Biggar

      Question:

      The Verbose information returns Type and Member name...but the table information returned doesn't have that.

      There is no "-slow"...any Idea hot to get all the table info populated?

      Thanks

      ---------------------------------------------------------------------------------------------------------------------------------------

      VERBOSE: 'SecTest' is inheriting access control
      VERBOSE: - InheritingFrom: 'Lansing Support\biggarr'
      VERBOSE: - Type: 'Document'
      VERBOSE: - MemberName: 'engineering support services'
      VERBOSE: - AccessMask: '--CDrwSRW--'
      VERBOSE: 'SecTest' is inheriting access control
      VERBOSE: - InheritingFrom: 'Lansing Support\biggarr'
      VERBOSE: - Type: 'Document'
      VERBOSE: - MemberName: 'All_Users (*Everyone)'
      VERBOSE: - AccessMask: 'NA'


      ProjectName : SecTest
      SecurityType : Project
      Type :
      Name :
      Access_Control_Settings :
      Workflow :
      State :
      InheritingFrom : Lansing Support\biggarr
      FullPath : SecTest
      ParentProjectName : SecTest

      ProjectName : SecTest
      SecurityType : Document
      Type :
      Name :
      Access_Control_Settings :
      Workflow :
      State :
      InheritingFrom : Lansing Support\biggarr
      FullPath : SecTest
      ParentProjectName : SecTest

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Brandon Williams
      0 Offline Brandon Williams Thu, Feb 17 2022 4:27 PM in reply to Robert Biggar

      try using this parameter -FolderLevel 1

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Brian Flaherty
      0 Offline Brian Flaherty Fri, Feb 18 2022 1:07 PM in reply to Robert Biggar

      The Type, Name, and Access_Control_Settings will only be returned for folders which have explicit access control set and is not inheriting.  Hope this helps.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • Brian Flaherty
      0 Offline Brian Flaherty Fri, Feb 18 2022 1:07 PM in reply to Robert Biggar

      The Type, Name, and Access_Control_Settings will only be returned for folders which have explicit access control set and is not inheriting.  Hope this helps.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    • Robert Biggar
      0 Offline Robert Biggar Mon, Jul 18 2022 9:54 AM in reply to Brian Flaherty

      Brian:

      I am trying to get a script to Break Inheritance. The direction I was headed is to change one of the users'  access mask...but I can't "see" what is on the folder...because only explicit ACL is being returned. Have you ever looked into this? Is there a better way...or a way to get the "inherited ACLs"?  

      Thanks

      Bob

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