In .NET version 4.5 or lower, how does one go about renaming an existing security group on the local windows machine?
Is there something like NTAccount.Rename that I'm apparently missing?
Here is some sample code to get the group name and prove it resolves.
Imports System.Security.Principal Module Module1 Sub Main() Dim nta As New NTAccount(Nothing, "Sample_Groupname") Console.WriteLine("NTAccount name=" & nta.ToString) Dim arSecurityIdentifier As SecurityIdentifier = DirectCast(nta.Translate(GetType(SecurityIdentifier)), SecurityIdentifier) Console.WriteLine("SID=" & arSecurityIdentifier.Value) Console.ReadLine() End Sub End Module
May we all make money in the sequel.