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

Simple pull but not working

$
0
0

I am trying to extract:

Name, SamAccountName, Description, EmailAddress

using the below commandlet ( I am going to put it in a script to run daily, but not until it pulls what I need).

Get-ADUser -Filter * -SearchBase "ou=<hospitalouname>, ou=Domain Users and Groups,dc=<domainname>,dc=local" | Select-Object -Property Name,SamAccountName,Description,EmailAddress|Export-Csv"<networkpathname>\smusers.csv"

I do get a csv file with the headers and information as shown below:

NameSamAccountNameDescriptionEmailAddress

Sam Smithssmith

I am not getting the Description or email address.

I would be ok if it pulled everything, because I can always pare it down later. We are running windows 2008 domain controllers using 2008 functional level



Karon W


Viewing all articles
Browse latest Browse all 15028

Trending Articles