I would like to make a custom MDT setting that lists the AD groups a computer should be added to.
I am using Maik's webservice to pull values from MDT Database. So I have the Setting created in MDT DB, and I have the value "AddtoADGroups" for a role set to ADgroup1;ADGroup2;ADGroup3. The GetSetting webservice will return that string "ADgroup1;ADGroup2;ADGroup3" Is there some built in method I can call or something that I can do that will parse that string so that AddtoADGroups001=Adgroup1, AddtoADGroups002=ADGroup2,AddtoADGroups3=ADGroup3? I see I could set the values like that in CustomSettings.ini, but I want to pull these from MDT. I need to convert the string that is returned by the webservice into something MDT/OSD understands is a List value. Is assigning AddtoADGroup(*) in properties enough? Does the ZTIGather just see that the value is a list and chuck the ";" separated text into the 001, 002, etc? [Settings] Priority= Constants, GetADGroups, Default Properties=RoleID, SettingType, ADGroupsSettingName, ComputerADGroups(*) [Constants] SettingType=R ADGroupsSettingName=ADComputerGroups [GetADGroups] WebService=http://HC-CM12MP1.healthcare.uiowa.edu/mdtwebservice/mdt.asmx/GetSetting Parameters=RoleID,SettingType,SettingName RoleID=MDTID SettingType=Type ADGroupsSettingName=Setting ComputerADGroups=string I think that this may not work. The guide on-line I am seeing looks like ZTIGather wants ... <?xml version="1.0" encoding="UTF-8"?> <ArrayOfString xmlns="http://dx21.llc/WS" xmlns:xsd="[url]" xmlns:xsi="[url]"> <string>ADGroup1</string> <string>ADGroup2</string> <string>ADGroup3</string> </Array of String> Where Maik's MDTwebservice returns the settings as <?xml version="1.0" encoding="utf-8" ?> <string xmlns="http://maikkoster.com/Deployment">ADGroup1;ADGroup2;ADGroup3</string> Is there a way to store an array in MDT DB so that MDTwebservice will return the XML like ZTIConfigure is expecting? Is there a way to make ZTIGather parse that string into MDT Values? I tried setting the setting to "ADGROUP1","ADGroup2","ADGroup3" too, but that also returned a single string and not multiple strings in XML. Would that be left to me as a programming exercise? Once I have the multivalue list filled in correctly, I will be able to use this post to add the computer to multiple groups, http://myitforum.com/cs2/blogs/maikkoster/archive/2012/07/05/handling-lists-in-mdt-web-service-calls-adding-computers-users-to-active-directory-groups.aspx but I need a little help in getting the multivalued list filled in. ________________________________ Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. ________________________________
