I am trying to create a runbook in SCCM that will list a the group in an OU then be able to select it and then add that user to the group. The process in the runbook is this currently. 1. enter user name then hit enter 2. opens up a drop down menu that will list the groups in the "applications" OU. (yes, that is the name of the OU) and click on "select" 3. then the user will get added to the proper group.
currently, I have a powershell form written that almost works, but I believe I am hitting the SCCM bug of wanting to only use powershell 2.0. I am getting a return of the distinguished name is not valid. I do have it hard coded into the form of what the DNs are and I verified my context is correct. I was advised to rewrite the whole procedure in C#. My only problem is that I haven't had the need to use or look at the code formatting. I know I am mostly self taught out of necessity so if I say something incorrectly, please forgive me.