There are certain limitations I’ve come across with PS scripts in worklets and I’m curious A) if they’re possible, or B) how exactly worklets invoke the scripts on remote endpoints. I’ve tried finding information on how exactly worklets run scripts on remote endpoints but it’s pretty obfuscated.
If I try calling a static .NET method for a Windows form element, like a notification popup, nothing will display on the remote endpoint. Example below:
Or if I try invoking rest method to send a message to Teams using a public incoming webhook, it will not post. Example below:
Invoke-RestMethod -Uri $webhookUri -Method POST -Body $json -ContentType "application/json"
How exactly do worklets run these scripts on remote endpoints, and are there ways to get examples such as these to work?
Best answer by AnthonyM-AutomoxView original