Using Powershell to send an ENTER keystroke to the Kaseya prompt window
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic');
[Microsoft.VisualBasic.Interaction]::AppActivate('Kaseya Remote Control');
[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms');
[System.Windows.Forms.SendKeys]::SendWait('{ENTER}');
When running it as a procedure in Kaseya:
- Use
executeShellCommand
- Run as User, not System
- Use this as the command:
powershell -c "[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic');[Microsoft.VisualBasic.Interaction]::AppActivate('Kaseya Remote Control');[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms');[System.Windows.Forms.SendKeys]::SendWait('{ENTER}');"