Different Results with Powershel v2 and v3
hope can me determine why there difference in data between v2 , v3 of powershell. development on laptop has version 3 installed, script executed on server has version 2 installed. #create directory searcher object , set it's porperties $searcher = new-object directoryservices.directorysearcher # (!useraccountcontrol:1.2.840.113556.1.4.803:=2) - filters out disabled accounts $searcher.filter = '(&(objectcategory=person)(objectclass=user)(!samaccountname=its-*)(!useraccountcontrol:1.2.840.113556.1.4.803:=2))' $searcher.pagesize = 5 $searcher.searchroot = "ldap://ou=district offices,dc=mydomain,dc=com" #load following properties $params = @("samaccountname","sn","givenname","mail","physicaldeliveryofficename","department","title","manager","distinguishedname") foreach($param in $params) { $searcher.propertiestoload.add($param) | out-...