The Set() method includes code that transforms the domain
variable to $env:computername when the domain is empty
or when it is "BUILTIN". However, the subsequent calls to
create a NTAccount and translate that account into a SID
fail when the domain is set to $env:computername.
The SID lookup works fine when the domain is set to
empty string, "." or "BUILTIN".
The Set() method includes code that transforms the domain variable to $env:computername when the domain is empty or when it is "BUILTIN". However, the subsequent calls to create a NTAccount and translate that account into a SID fail when the domain is set to $env:computername.
The SID lookup works fine when the domain is set to empty string, "." or "BUILTIN".
This change is