• @rtxn
    link
    English
    244 months ago

    No, it really is super simple, just:

    Set-HostElevatedPrivilege -SubstituteUser Administrator -Privilege [Microsoft.Automation.HostPrivilege]::new("Administrators", $(hostname)) -Credential $(Get-Credential) -Command "ping 1.1.1.1"
    
    • Aatube
      link
      fedilink
      24 months ago

      It’s more complicated than that. It seems to be able to configurably block user input for sudo’d commands, retain the existing environment, ditch it and open a new window, and remember that you’ve sudo’d in the last minute or so.