You need a Domain Name in the following code snippet –
objUserDN.Init(1,"DOMAIN NAME HERE");
objUserDN.Set(3,"DOMAIN NAME HERE\\"+strUsername);
Now what if you wanted to use the script for multiple domains without having to modify the code to change the domain name ?
You can use ActiveX with a Windows Script Host function to get the domain name as well !
To get it, you can simply use the following code snippet :
var strDomain = wshell.userdomain;
With that code,
strDomain will now contain the NetBIOS Domain name which is used here.