Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Need information out of a group

$
0
0

Need help with a script.

I can export the names of the users in a group but I am trying to get more information about the user.  I have the following script that will export the users to a CSV file. 

Get-ADGroupMember -Identity Group you want | Export-Csv C:\Temp\File.csv

I want to use a foreach statement to add the following:

get-ADuser -Properties * | Select-Object -Property Name,SamAccountName,Description,EmailAddress,LastLogonDate,Manager,Title,Department,whenCreated,Enabled,Organization | Sort-Object -Property Name | export-csv -path C:\temp\test.csv

Can someone help me put the script together.

Thanks for your help.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>