Product: PowerShell Universal
Version: 1.5.18
Hi all,
I’m trying to get the label of a chip when it is deleted, but the $Element
variable below is just blank. The $EventData
variable is valid and shows the GUID Id of the chip.
New-UDChip -Label $chipUserName -Avatar $chipUser.avatar -AvatarType image -OnDelete {
Show-UDToast -Message "eventdata is: $($EventData)"
$Element = Get-UDElement -Id $EventData
Show-UDToast -Message "element is: $($Element)"
Show-UDToast -Message "element.value is: $($Element.Value)"
...
Does anyone have any ideas? Or even better, a way to hold another value behind the chip label (I’d like to have the label of the chip as the username and the value to be the user’s SID).
What I’m trying to do is list the members of an AD group, each as their own chip with the user’s avatar. This works fine. Then on delete of the chip I want to remove that user from ther AD group using Remove-ADGroupMember
Cheers!
Steve.