Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
; !Not tested! sUserName = dsGetProperty(sObjectPath, "samAccountName") sUpn=strcat(sUserName,"@",sDnsDomain) dsSetProperty(sObjectPath, "userPrincipalName", sUpn)Where sObjectPath is the users LDAP style moniker and sDnsDomain is the DNS style domain name (yourdomain.yourcompany.com or whatever).
Commonly, the UPN is the samAccountName, an '@' and the domain name in dot notation. This makes it easier for the user to remember .
sAdsiPath = "LDAP://%pdc%" ; ; Find the complete path to the user object. sUserPath = dsFindPath(sAdsiPath, "cn=*%name%") sUserPath = ItemExtract(1, sUserPath, @TAB) sUpn = strcat(newid, "@", domain) dsSetProperty(sUserPath, "userPrincipalName", sUpn)
Article ID: W16324
File Created: 2005:02:18:12:19:48
Last Updated: 2005:02:18:12:19:48