$objdomain = New-Object System.Directoryservices.DirectoryEntry
$searcher = New-Object system.directoryservices.directorysearcher
$searcher.SearchRoot = $objdomain
$searcher.filter = "(&(objectcategory=user)(samaccountname=singhn))"
$userobj = $searcher.findone()
$u = $userobj.getdirectoryentry()
$u | fl
No comments:
Post a Comment