Be sure to check out my Scripting4Crypto initiative. It’s a fun way to get into using cryptocurrencies all while getting your PowerShell needs met.
I recently had a request for a script to reset folder access control such that all sub-folders inherit from the Project or Parent folder. The following is what I came up with.
# Parent folder to force all subfolder to inherit from. $ParentFolder = 'test\Parent_123456' <# The following will return the ProjectWise folder objects for the parent folder and all sub-folders. #> $PWFolders = Get-PWFolders -FolderPath $ParentFolder -Slow -Verbose <# The following will remove the parent folder from the array. Want to ensure the Parent folder's access control is not reset. #> $PWFolders = $PWFolders | Where-Object { $_.FullPath -ne $ParentFolder } # The following will reset the access control for the remaining ProjectWise folder objects. Reset-PWFolderSecurity -InputFolder $PWFolders -AllSecurity -IncludeWorkflows -Verbose