List local Windows Administator names with .NET
First, you need to install the NuGet Package System.DirectoryServices.AccountManagement Now you can open a context and get all members of the built-i
First, you need to install the NuGet Package System.DirectoryServices.AccountManagement Now you can open a context and get all members of the built-i
To list the local administator accounts, you can just use the group membership command Get-LocalGroupMember -Group "Administrators" Object