header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Listing home folder from object, getting ACLs from the home folder.
Last Post 17 Aug 2009 06:07 AM by techguy. 0 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
techguyUser is Offline
New Member
New Member
Posts:1
Avatar

--
17 Aug 2009 06:07 AM
    I have the following script to verify a user has a home folder in their object. I also want to verify the user has the assigned rights to their home folder and thought I would use get-acl.
    #-------------------------------Begin Script-----------------------------------------------------------------# Setup output file with date format
    $OutPutFile = "GetUserHomeDrivePerOULog-{0} {1}.csv" -f ($_.name -replace ", ","-"),((Get-Date -f U) -replace ":","-")
    $Ou = 'ou=Users,dc=domain,dc=com' 
    # Get all users in the $OU and read name, homedir, homedrive, profilepath, and DN # then write to file
    get-qaduser -SearchRoot $OU -SizeLimit 0 -DontUseDefaultIncludedProperties -IncludedProperties name, homedirectory, homedrive, profilepath, DN ` | select Name, Homedirectory, Homedrive,Profilepath,DN | Export-Csv $OutPutFile -NoTypeInformation

    How would i incorporate get-acl into my loop so it prints the acl to the csv in another column? I would only select-object accesstostring value. For Example, get-acl c:\temp | select-object accesstostring.
     I basically need to store the homedirectory value into variable and then get-acl that variable and include it's output into my CSV. Thanks for the help.
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer