I learned today how to query AD from the command line to list only active servers. The filter includes the conditions "not disabled" and also "not an EMC Celerra"
csvde -f output.csv -r "(&(objectClass=computer)(!(userAccountControl=4098))(&(operatingSystem=*server*)(!(operatingSystem=EMC Celerra *))))" -l displayName,operatingSystem,operatingSystemVersion,operatingSystemServicePack,name,cn,dNSHostName
csvde -f output.csv -r "(&(objectClass=computer)(!(userAccountControl=4098))(&(operatingSystem=*server*)(!(operatingSystem=EMC Celerra *))))" -l displayName,operatingSystem,operatingSystemVersion,operatingSystemServicePack,name,cn,dNSHostName
Comments
Post a Comment