How can I find out if an object is a user or group?
Say I do a get-acl and i see…
domain\awellis
domain\IT GROUP
Is there a command to query AD to see that the first one’s type is user and the 2nd one’s is a group?
How can I find out if an object is a user or group?
Say I do a get-acl and i see…
domain\awellis
domain\IT GROUP
Is there a command to query AD to see that the first one’s type is user and the 2nd one’s is a group?
Get-ADObject outputs among other stuff the ObjectClass
Ahhhhh that was too easy! Thanks for that…
Works just like I needed it to
((Get-ADObject -filter *) | ?{$_.name -like “admibistrator”}).objectclass
If you move your filter to the cmdlet it might be faster if you’re lucky
(Get-ADObject -filter {Name -like "admibistrator"}).objectclass
Even faster…thanks again sir!