- February 28, 2016 at 8:42 pm #35800
I've got an app (sefautil.exe for Microsoft Lync) that will only run as an administrator. I'm trying to call the app from another machine using invoke command. It works ok, but unless the app is running 'as an administrator' it doesn't work.
How can I get invoke command to run something on a remote computer with the 'run as administrator' switched on ?February 29, 2016 at 2:45 am #35802
Short of running the console / ise as administrator mode you could try using the credential parameter and plug in an administrator account.February 29, 2016 at 4:53 am #35805
When you're connecting to a remote computer, running "as administrator" should be automatic, unless you're connecting with a _local_ account on that remote computer. By default, that doesn't work, but there's a registry setting that you can configure to enable remote admin access for local accounts:March 22, 2016 at 3:14 pm #36890
I managed to get this working by creating a script on the server with the seafutil. After that I created another script on my machine that creates a scheduled task on the server with the 'run level' highest set (Run as administrator) ( Register-ScheduledTask -Action $action -Trigger $trigger -User $user -Password $Password -TaskName "ForwardPhone" -Description "Forward Phone calls for $Number_param " -RunLevel Highest
Once it creates the task, it then runs it once and then deletes it.
A bit messy but at least it works.
You must be logged in to reply to this topic.