Possibility to use AddUsersToPFRecursive.ps1 not at TOP folder.

PRAA
PRAA used Ask the Experts™
on
Hi everyone, I would like to know if I can use AddUsersToPFRecursive.ps1 not at TOP folder. We have lot of projects in top folder "\Projets" but inside theses projects folder I would like to do recursive to SUB folder "\Projects\folder1" and maybe if it's possible to do add a user to all "Administration in all "folderX" under Project"
 
"\Projects"
 "\Projects\folderA\test"
 "\Projects\folderA\ok"
 "\Projects\folderA\Administration"  <-------
 "\Projects\folderB\test"
 "\Projects\folderB\ok"
 "\Projects\folderB\Administration"  <-------

do you know any possibility to do that using this AddUsersToPFRecursive.ps1 or something else.

thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
I have found a MS software PFDAVAdmin but when I try to get it work in "Propagate ACEs" with the option "Apply only to folders named:" checked I got

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Exception: Invalid filter string. Index was outside the bounds of the array.
   at pfdavadmin.FolderFilter.GetConditionsFromString(String& filterString)
   at pfdavadmin.FolderFilter.BuildFilterFromString(String filterString)
   at pfdavadmin.Form1.PropagateAce(TreeNode selectedNode)
   at pfdavadmin.Form1.PropagateMenu_Clicked(Object sender, EventArgs e)
   at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.MenuItemData.Execute()
   at System.Windows.Forms.Command.Invoke()
   at System.Windows.Forms.Control.WmCommand(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2407
    CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
PFDAVAdmin
    Assembly Version: 6.5.0.0
    Win32 Version: 6.5.7911.0
    CodeBase: file:///C:/PFDAVAdmin/PFDAVAdmin.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2407
    CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
Accessibility
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------
System.DirectoryServices
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.directoryservices/1.0.5000.0__b03f5f7f11d50a3a/system.directoryservices.dll
----------------------------------------
System.Xml
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
E2kfdacl
    Assembly Version: 6.5.0.0
    Win32 Version: 6.5.7911.0
    CodeBase: file:///C:/PFDAVAdmin/E2kfdacl.DLL
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
Are you able to use PFDavAdmin to view the PF ? I mean can you view PFs ??

Author

Commented:
Hi,
Yes I'm able to see the PF and apply recursive security  to the folder I select like I select Projects and apply the security to all like:
"\Projects"
 "\Projects\folderA\test"
 "\Projects\folderA\ok"
 "\Projects\folderA\Administration"
 "\Projects\folderB\test"
 "\Projects\folderB\ok"
 "\Projects\folderB\Administration"

 or  
select Folder A and make it apply to
Test, OK and Administration folder....it work
But if I select "Apply only to folders named:" in PFDavAdmin for all folder named "Administration" under the folder Projects I got the error.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Ok i did the same re-pro at my lab - and guess what - gave the same error LOL

However, i made a command and it works pretty cool.

Get-PublicFolder -Server "E2k7 box" -identity "\Project" | where {$_.name -like "Administration"}

This would give result for all sub folders created within project folder named "Administration".

Once you get this result, you can easily play around with what ever permission you want to append.


Author

Commented:
I use the command you made, I get no error but I dont get any information output from it. Do you have experience something like this also?
Get-PublicFolder -Server "E2k7 box" -identity "\Project" | where {$_.name -like "Administration"}

no output

Using this
Get-PublicFolder -Server "E2k7 box" -identity "\Project" | where {$_.name -like "*"}

i got

Name                                                        Parent Path
----                                                        -----------
Project                                                      \
like is not searching in subfolders.

 
Commented:
add "-recurse" before "| where"

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial