Ad Widget

Collapse

Running Powershell As Administrator for pushed custom scripts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Anonymouse
    Junior Member
    • May 2023
    • 2

    #1

    Running Powershell As Administrator for pushed custom scripts

    Hi,

    I have a script that checks the Backlog of DFS Replication, but it needs to run as Administrator.
    In the user parameters, I've gone with UserParameter=dfsrcheck[*], Powershell.exe -Command "& {Start-Process Powershell.exe -Verb RunAs}" -NoProfile -ExecutionPolicy bypass -File "file location" but it seems to only run powershell and give no actual output.

    Is there a way to run as admin when pushing out scripts like this?
Working...