I've read quite a bit online about this and thought I had found a solution, but it doesn't seem to be working like I would expect.
I am wanting to get a user based on the username I input, then remove all groups that it is a member of. Basically the same thing as going into ADUC, selecting the user, selecting the Member Of tab, highlighting everything (except domain users of course) and selecting remove.
Here's the command I'm trying to use:
Get-QADUser -Name $username | Remove-QADMemberOf -RemoveAll
Others have said online that it works for them, but so far it hasn't for me. It doesn't give an error, it accepts the command just fine, but when I look in ADUC, the groups are still there for the user.
Any suggestions as to what I may be doing wrong?
Executing from Windows 7 with domain admin rights, Exchange cmdlets and Quest snapin loaded.