Biting the bullet and moving from ds commands to powershell for automating group membership and shadow groups. Due to the fact there are at least 2 bugs I know of, reported years ago with no response or care from Microsoft to support their products...
Anyway. So running something simple like "get all the members of X OU and add them to this group" works fine for me in powershell. But then when I rerun it it stops with an error because the first user is already a member and doesn't run the rest.
Is there a way in these very simple "scripts" I need to write to tell it to just not stop on an error and just go to the next? Or even better a command actually designed with AD Administration in mind that would give an option or by default do this? I mean, the purpose of powershell is for scripting right? No admin is sitting there using it as some replacement for the once off ADUC GUI management? So why have commands that are meant therefore perform routine tasks adding or removing users that stop when a member is already present? Just blows my mind how this is meant to be a replacement to the ds commands that would just work (in the past)...
Anyway... Ranting aside, simple way to get the command to just continue past and onto the next user? Really would prefer something that isn't basically programming or loops and whatever. Needs to be something day to day IT people can understand, not programmers.
For instance here:
http://social.technet.microsoft.com/Forums/en-US/116d670c-fa1b-4c75-b4d3-cb6d78781aea/adding-members-to-ad-security-group-with-powershell
It's like a program in itself... Arrays and shit? To do what was a single line with ds commands? Literally before was something like dsquery user .... | dsmod group "cn=....." -chmbr. Can't even find something the would replicate the -chmbr behaviour in powershell. Maybe with 50 lines and arrays and a whole giant headache for what was one line?