• rtxn@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years 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"
      
    • SilverShark@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      Indeed. The name doesn’t follow the conventions of other commands in Windows/Powershell at all. And it is inconsistente too. “sudo” stands for “super user do”, but in Windows the notion of super user is called administrator. This will likely also cause confusion with people googling for “sudo” and getting to *nix related pages instead.

      • abbadon420@lemm.ee
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        Nah, you can just google “windows+sudo” and look at if your results talk about unix or windows. And if they’re post 2024