This is a simple command to launch elevated processes using Ivanti Application Control shell integration.
The core is directly taken from ykoster/Start-ProcessAMSelfElevate.psm1.
The original script
uses the AMShellIntegration.AMShellContextMenu COM component to invoke the Self-Elevation functionality of Ivanti AppSense Application Manager.
When enabled, Self-Elevation can be used to run (selected) applications with Administrator privileges. Generally, this functionality is only exposed from Windows Explorer. Using this module, it is possible to call this component directly (with arbitrary arguments).
The C# class is reused as-is, a wrapper Main method is added to launch the program, that additionally ensures the required services are running when attempting to invoke the privileges elevation, then restores their original state.
It is meant to be compatible with gsudo as used by WingetUI.
$> gsudo -v
ivanti-gsudo 0.0.2
Cache is not implemented, only compatible arguments parsing is.
$> gsudo cache ...
Info: No cache inplemented.
$> gsudo -k
Info: No cache inplemented.
$> gsudo notepad C:\Windows\System32\drivers\etc\hosts
A dialog for self-elevation reason auditing is displayed, and the process is launched upon dialog validation.