Getting Windows "MACHINE SID" without fork() & exec()?

William Stewart abqbill@gmail.com
Tue Apr 28 13:24:14 GMT 2026


On Thu, Apr 23, 2026 at 11:24 AM Takeshi Nishimura wrote:

Pass MACHINE SID around in a shell script. Doing that by calling
> powershell each time is very expensive, around 92% of the scripts
> whole runtime


Can you describe what you mean by "calling powershell each time"? Getting
the computer's SID in PowerShell can be quite efficient if you use P/Invoke.

But aside from that, what problem are you solving that requires getting the
machine's SID?


More information about the Cygwin mailing list