testeronious@lemmy.world to Programming@programming.devEnglish · 11 months agoIntroducing Sudo for Windowsdevblogs.microsoft.comexternal-linkmessage-square33fedilinkarrow-up1117arrow-down16
arrow-up1111arrow-down1external-linkIntroducing Sudo for Windowsdevblogs.microsoft.comtesteronious@lemmy.world to Programming@programming.devEnglish · 11 months agomessage-square33fedilink
minus-squarertxn@lemmy.worldlinkfedilinkEnglisharrow-up25·11 months agoNo, 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"
minus-squareAatube@kbin.sociallinkfedilinkarrow-up2·11 months agoIt’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.
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"
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.