• rtxn@lemmy.world
    link
    fedilink
    English
    arrow-up
    19
    ·
    10 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@kbin.social
      link
      fedilink
      arrow-up
      2
      ·
      10 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.