Tuesday, April 22, 2014

MemberOf What?

Still waiting, got bored of playing with Whoami so chased the data upstream a bit.

Here’s how to check if AD has the group membership I’ve been waiting for, to do my job…

 

Get-ADUser craigm -Properties memberof |

Select-Object -ExpandProperty memberof |

Where-Object {$_ -like '*vstf*'}

 

The above command looks at the memberOf property of my user object, then looks for the name of the group I’m waiting to become a member of.  If the output contain that group, then I’m a member.  Otherwise it either hasn’t replicated to the DC I’m talking to, or FIM hasn’t exported the change through the ADMA yet.

No comments: