0

I am trying to type out a String over Windows Remoteassistanse, but my PowerShell Script doesn't work.

It works in the normal editor and Teams Remotecontrol.

$text = "HI"
$wshell = New-Object -ComObject wscript.shell;

$wshell.SendKeys($text)

Does Remote Assinstance block something like this for security reasons or is there just a better way?

It doesn't have to be in PowerShell by the way I also wrote the a script with Python which had the same problem.

Thank you for your answers

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
vince
  • 765
  • 3
  • 14

1 Answers1

0

I have found the solution!

The script didn't run because it couldn't access the window. Running the script as administrator fixed the issue for me.

vince
  • 765
  • 3
  • 14