From a domain controller:
csvde -f AD_output.csv -r objectclass=computer -l “DN, cn, ObjectClass, Description, whenChanged, operatingSystem, operatingSystemVersion, operatingSystemServicePack”
The list of Attributes that can be extracted can be quickly found by looking at the Attribute Editor Tab on one of the computer objects properties. Some date values don’t report in a useful format or need to be adjusted in excel. Also, note that if the Operating system has a “®” reported in the GUI it most likely will report with a long numeric string in the csv, this string would be consistent so you should be a ble to do a search and replace after determining the correct value.
OU,computer,COMPUTERNAME,Hyper-V Host Server,20120511160001.0Z,Windows Server 2008 R2 Datacenter,6.1 (7601),Service Pack 1