I've been trying to find a way to add cached domain user to local admin group. Every solution seems to require connection to the domain. Is there a way to get user object from a local cache based on name or username and add them to local Administrators group? Please help.
This is the code that works with the domain controller available. Any advice would be much appreciated.
grp = GroupPrincipal.FindByIdentity(lclctx, IdentityType.Name,
grp.Members.Add(domctx, IdentityType.Name, strName)