Hi
I have recently disabled and moved a bunch of users and now I have to remove them from the groups they are members of (except for a default group).
I have attempted to do this using set-qaduser but I get the the following error:
Set-QADUser : A parameter cannot be found that matches parameter name 'memberof'.
At line:1 char:34
+ set-qaduser "Test User" -memberof <<<< "users, Domain Users"
At the moment I am testing the process with the following command;
Set-QADUser "Test User" -includeproperties memberof "Users, Domain Users"
But I plan to take the list of users and put hem into a variable and then run ammend the group membership on each one.
$users = (c:\users.txt)
foreach ($user in $users) { Set-QADUser "$user" -includeproperties memberof "Users, Domain Users" " }
Does anyone have any ideas if what I am trying to do is the right way about it?
Many thanks
Lee