1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Any powershell guru's in da house

Discussion in 'Scripting & Programming' started by dales, Mar 24, 2010.

Click here to banish ads and support Certforums by becoming a Premium Member
  1. dales

    dales Terabyte Poster

    Hi all,

    Hoping that there are some powershell god's here that can help me. I have been given a task of setting some netware permissions for folders with a certain name.

    This is all payroll stuff so for example HR have a folder for every person and in that folder are other subfolders such as training,Payroll,sickness. What I would like is to start at the parent folder and scan each persons folder and when the script comes across a folder called payroll then kick off a netware app called lrights which will allow me to script the permissions change.
    I guess I will need to do some kind of get-childitem and save the results into an array!? which can then be called back and written into a variable for the lrights executable.

    The kind of output into the array that I will need would be something like P:\user\payroll

    At the moment the script I have created give this output for each user:

    Directory: P:\lastname, firstname

    Name : Payroll
    CreationTime : 18/01/2010 11:27:08
    LastWriteTime : 18/01/2010 11:27:08
    LastAccessTime : 01/01/1601 00:00:00

    My script at the moment looks like this:

    Function FindFolder
    $input | Where-Object {$_.Name -eq “Payroll”}
    Get-ChildItem -Path P:\ -Recurse | FindFolder | Format-list

    Any help/advice very gratefully accepted
    Certifications: vExpert 2014+2015+2016,VCP-DT,CCE-V, CCE-AD, CCP-AD, CCEE, CCAA XenApp, CCA Netscaler, XenApp 6.5, XenDesktop 5 & Xenserver 6,VCP3+5,VTSP,MCSA MCDST MCP A+ ITIL F
    WIP: Nothing
  2. craigie

    craigie Terabyte Poster

    I'm in da office.

    But I'm not a powerhell guru :D
    Certifications: CCA | CCENT | CCNA | CCNA:S | HP APC | HP ASE | ITILv3 | MCP | MCDST | MCITP: EA | MCTS:Vista | MCTS:Exch '07 | MCSA 2003 | MCSA:M 2003 | MCSA 2008 | MCSE | VCP5-DT | VCP4-DCV | VCP5-DCV | VCAP5-DCA | VCAP5-DCD | VMTSP | VTSP 4 | VTSP 5

Share This Page