Using this GUI ...
Add checkboxes to Listbox with Powershell Windows Forms
... how would I go about creating an array of each checked box?
My use case is I have a New User form and I've added a button which runs this form as a popup window and each checkbox item is a security group to be added to the user later in another function. I'm using an array so the group list can be easily customized for other clients.
I've messed around with this for a while now but I haven't had much success.
Perhaps add a button on the form which runs something like; foreach $e.item.checked add $e.item.text to $array. I've made several attempts based on that method, but I keep hitting walls.
Aucun commentaire:
Enregistrer un commentaire