Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

output csv file shows values Microsoft.ActiveDirectory.Management.ADPropertyValueCollection

$
0
0

Hi,

I am trying to get the list of disabled users from AD. using the below script,

 

Get-ADUser -Filter {Enabled -eq $false} | select Name,department,sAMAccountName,givenName,sn,DisplayName,title,AccountExpires,pwdlastset,lastLogon,whenCreated,Descriptions,Mail,ScriptPath,homeDirectory,homeDrive,Company,CN,dstinguishedName |export-csv "C:\Users\admbharti.gupta\Activeusers.csv"

 

and when i am trying to export the result in csv file its showing this value "Microsoft.ActiveDirectory.Management.ADPropertyValueCollection" for many attributes like 'pwdlastset' ,'lastlogon','description' etc. Although Name, Samaccountname and displayname values are coming fine.

Kindly tell any way or method through which i can get all correct  values instead of this value "Microsoft.ActiveDirectory.Management.ADPropertyValueCollection".

 

 

 

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles