I am having a problem figuring out how to show if a user is a member of a group. I am query attributes of all users under a ou and want to show the users is a member or not of the VPNUsers group. This is my current script:
get-qaduser -searchroot $ou.dn -IncludedProperties 'distinguishedName','sAMAccountName','DisplayName','whenCreated','title','info','homeDirectory','accountexpires','lockouttime','mail','department','description' -sizelimit 0 | select-object distinguishedName,sAMAccountName,DisplayName,whenCreated,title,info,homeDirectory,accountexpires,lockouttime,mail,department,description | export-csv $tempDirectory$csvfilename -notypeinformation
Any hep would be appreciated. |