So first of all. I LOOOOVE UD. So much that I bought a license just to replace my GUI powershell support tools with a version all done in UD. So far so good. However I’m running into an issue or maybe I’ve reached the limitations of the prodcut. Here is what I am doing.
Im taking a list of Collections from SCCM and want to use them as the values in a New-UDInputField but not sure how to import them into the values field. Might not even be a UD issue but a powershell issue.
Just out of curiosity, what does your code currently output? From what I can tell, you’re going to get a single option in the dropdown that is actually your array of names separated by spaces. Have you tried something like this?:
It outputs a table but i modified it to only give me the name of the collection in the $collections variable. Just not sure that would work. I have however gone around it for now and created a new dynamic page.
I took a look at the SCCM query since I don’t know how you formatted the text file. I was able to get it to work with the code you provided. What does the drop-down list give you? Mine presents me a dropdown populated with a list of all the collection names.
i get a list of all the collection names, however its ONE item, not individual items. For the sake of sanity I have just put a list in a text file and done get-content so its a list of just the names, same result.
It seems if i get the AD groups or SCCM Collections as objects with a header such as Name, then call $variable.name in the Values field it works just fine. However just importing a list from a text file with no header doesnt work and just makes it one big field.