Trying to find who joined the computer to the domain. But in C# (.NET Core).
This is the exact answer (the question title is not worded well): Powershell ADSI ntSecurityDescriptor
$Computer = [ADSI](([ADSISearcher]"(name=myComputer)").FindOne().Path)
$Computer.PsBase.ObjectSecurity.Owner
Alternatively, you can do this, but you need to have the Active Directory Module installed:
(Get-ADComputer myComputer -Server some.domain.com -Properties nTSecurityDescriptor).nTSecurityDescriptor.Owner
My assumption is that this returns who joined the computer to the domain, but I don't know how this actually works. However this seems like the data I need, but I want to do this in C#.