Category : active-directory

Here is a very simplified version of Powershell script I’d like to use to return ADUser properties (in a CSV) such as name, givenName, Office etc for users in a given OU. [void][Reflection.Assembly]::LoadWithPartialName(‘Microsoft.VisualBasic’) $title = ‘Get-ADUser Properties’ $msg = ‘Enter desired User properties, each seperated by a comma:’ $default = "name, office" $propertiesSought = [Microsoft.VisualBasic.Interaction]::InputBox($msg, ..

Read more

I am trying to remove (and join) a computer from my domain using netdom. I run the command from the domain controller (as a domain admin) as follows: netdom remove *computername* /domain:*domainname.local* /UserD:*domainadminname* /PasswordD:*domainadminpassword* /UserO:*localadminname* /PasswordO:*localadminpassword* computername – Name of the computer which I want to remove. localadminname & localadminpassword – Credentials of the local ..

Read more

Using BouncyCastle library and the code below it is possible to access the MS Windows certificate template information extension of a SSL certificate stored in MS Windows’ trust/certificate store. final KeyStore keyStore = KeyStore.getInstance("Windows-My", "SunMSCAPI"); keyStore.load(null, null); final X509Certificate certificate = (X509Certificate)keyStore.aliases().nextElement(); // see https://docs.microsoft.com/en-us/windows/win32/seccertenroll/supported-extensions#template final String XCN_OID_CERTIFICATE_TEMPLATE = "1.3.6.1.4.1.311.21.7"; final byte[] extensionValue = certificate.getExtensionValue(XCN_OID_CERTIFICATE_TEMPLATE); ..

Read more