Hi everybody!
I’m trying to play around with the Event Hubs. Anyone already tried a bit more “complicated” stuff?
Actually I’m trying to do something quite simple though… Instead of passing a simple “string” to the -Data parameter (which accepts an “object”), I’m now trying to send an object that I can use on the connected client.
However I’m not able to figure out how to properly pass the data…
Based on the docs it states that it accepts an object that will be serialized using CLIXML:
So how can I pass an object containing multiple data to the client?
Right now nothing seems to “arrive” to the client… only if I pass a simple string…
Any help is much appreciated!
Thanks a lot to anybody willing to help
Here’s my dashboard example to play around…
New-UDForm -Children {
New-UDTextbox -Id 'message' -Label 'Message'
} -OnSubmit {
$obj = [PSCustomObject]@{
ComputerName = $($EventData.Message)
Username = $Secret:rdpuser1.Username
Password = $Secret:rdpuser1.Password
}
# works
Show-UDToast $obj
# doesn't seem to work. :-(
Send-PSUEvent -Hub 'eventhub' -Data $obj
}