Maybe this script is a good starting point:
Regards
Andreas Baumgarten
(Please don't forget to Accept as answer if the reply is helpful)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Good morning and Hi to all!
I am a newbie to Powershell scripting and have a task on hand but unable to get the results I needed and hope I can get some help here.
There are many Groups in AD, but I need to focus only on 2 distinct Groups namely TeamA and TeamB. I would like to query AD for the group the current logon user belongs to, showing only the SAMAccountNane of the Group.
Further to this, I would be required to check whether the current logon user SAMAccountName is in the same Group as that of another SAMAccountName.
Really appreciate any guidance as to how I can achieve the above.
Thank you and best regards.
Ronald
Maybe this script is a good starting point:
Regards
Andreas Baumgarten
(Please don't forget to Accept as answer if the reply is helpful)