Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2478
  • Last Modified:

Possibility to use AddUsersToPFRecursive.ps1 not at TOP folder.

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
0
PRAA
Asked:
PRAA
  • 3
  • 2
2 Solutions
 
PRAAAuthor 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.
0
 
Exchange_GeekCommented:
Are you able to use PFDavAdmin to view the PF ? I mean can you view PFs ??
0
 
PRAAAuthor 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.
0
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

 
Exchange_GeekCommented:
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.


0
 
PRAAAuthor 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.

 
0
 
kjetpettCommented:
add "-recurse" before "| where"
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now