locked
Return $var in function RRS feed

  • Question

  • Hello all,

    Having some problems with a script returning $var from functions.

    I have the functions as the follow example:

    $folderOwner = (Process-ADObj($owner))[0]  ####(here i just want value $ADobjid)

    $aclId = Process-ADObj($ADuser) ##(here i want varaibles $ADobjid and $ACL_TYPE_USER)

    Function process-ADObj($owner) (returns following variables)

    $ADobjid

    $ACL_TYPE_USER

    ###END########

    How can i get only 1 values in $ADobjid for funciton $folderOwner  and  $ADobjid and $ACL_TYPE_USER for function $aclId?

    Any help is welcome.

    Regards,

    • Moved by Bill_Stewart Friday, November 20, 2015 7:23 PM Poor quality question/shows no research effort
    Wednesday, August 19, 2015 6:17 PM

All replies

  • Functions must be stated BEFORE they are called.


    \_(ツ)_/

    Wednesday, August 19, 2015 6:24 PM
  • I am declaring it before. just dont know how to get them of... :(
    Wednesday, August 19, 2015 8:31 PM
  • you are declaring it at the end of the script.

    \_(ツ)_/

    Wednesday, August 19, 2015 8:41 PM
  • Just in the post : in the script its before
    Wednesday, August 19, 2015 8:43 PM
  • If you want help you have to post an accurate script with a clear error message.


    \_(ツ)_/

    Wednesday, August 19, 2015 8:47 PM
  • $folderOwner,$aclId=Process-ADObj $ADuser

    \_(ツ)_/

    Wednesday, August 19, 2015 8:49 PM
  • tks mate

    Wednesday, August 19, 2015 8:51 PM