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

William Stewart via Cygwin <[email protected]> Tue, 28 Apr 2026 07:24:14 -0600
Newsgroups gmane.os.cygwin
Message-ID <CANV9t=QX6jKVM4AOjLxAQO7ztPQdsNgDCWEwwxS0jHbBwgbQ-g@mail.gmail.com>
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?

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple