Forum Discussion
Remove computers from multiple domains from one AD group
Hi Lain,
So I'm clear, for the txt file, I should continue to use the format of
^cn=machine,.$
^cn=machine2,.$ and so on? I have to prepare a file of 200 server names :-)
Jeff
Hi jmaraviglia,
Either format will do.
Technically, "^cn=machine2," is just a stricter version of "=machine2," since it's using the "^cn=" to say "this computer's full path must begin with 'cn=machine2,' where "=machine2," is more relaxed and says "this computer's path simply needs to have '=machine2,' anywhere in it".
You can refer back to my first post which has the small table I added as well as a link to Microsoft's RegEx pattern documentation for a more in-depth explainer on those patterns.
Cheers,
Lain
- jmaravigliaApr 15, 2025Copper Contributor
Thank you for all of your help, Lain. I was able to finally complete this task. I will continue to train and practice with Powershell. I can tell I have a very long way to go. :-)
Jeff