Powershell script to run commands remotely via TRIGGERcmd
-
Here's an example Powershell script you could use to call the TRIGGERcmd API to run a remote command:
$postdata = @{ trigger='notepad' computer='Laptop' # params='optionalparameter.txt' } $token=Get-Content ~\.TRIGGERcmdData\token.tkn $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("authorization", "Bearer " + $token) $json = $postdata | ConvertTo-Json $response = Invoke-RestMethod 'https://www.triggercmd.com/api/run/triggerSave' -Method Post -Body $json -ContentType 'application/json' -Headers $headers -
R Russ referenced this topic on
-
R Russ referenced this topic on
-
@Russ como posso efetuar este comando o powershel?
start microsoft-edge:https://www.xbox.com/pt-BR/play/launch/forza-horizon-5-edição-padrão/9NKX70BBCDRN
$wshell = New-Object -ComObject wscript.shell;
$wshell.AppActivate('edge')
while ($true)
{
Sleep 2
$wshell.SendKeys('{f11}')
exit
}exit
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login