By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
You can use the following VB Script to verify that an individual already has an account in the domain. Replace the text in bold with your specific information.
Dim oUser, oDomain Set oDomain = GetObject("WinNT://"&sDomainName) oDomain.Filter = Array("user") For Each oUser In oDomain If LCase(oUser.Name) = LCase(sUserName) Then WScript.Echo oUser.Name & " already has an account." WScript.Quit End If Next
Dig Deeper on Microsoft Active Directory
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.