Run Command as administrator in PowerShell script. UAC

前端 未结 4 1642
北海茫月
北海茫月 2021-02-20 05:06

OK here is my issue:

I am trying to run a script remotely on a server.

I am an administrator on both boxes, firewall exceptions are in place, remote admin is e

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-20 05:26

    This seems to indicate that you need to ensure you are a local admin on the remote machine (although admittedly this is for WMI specifically). According to this you can change a registry key to stop UAC applying to remote logons for administrators (search for LocalAccountTokenFilterPolicy). That shouldn't disable UAC just not filter the token if you use powershell/WMI remotely with an administrator account.

提交回复
热议问题