Copies a published certificate from a template account (userTemplate) and assigns it to the MyerKen Active Directory user account. This operation replaces any existing published certificates for the MyerKen account.
On Error Resume NextConst ADS_PROPERTY_UPDATE = 2Set objUserTemplate = _GetObject("LDAP://cn=userTemplate,OU=Management,dc=NA,dc=fabrikam,dc=com")arrUserCertificates = objUserTemplate.GetEx("userCertificate")Set objUser = _GetObject("LDAP://cn=MyerKen,OU=Management,dc=NA,dc=fabrikam,dc=com")objUser.PutEx ADS_PROPERTY_UPDATE, "userCertificate", arrUserCertificatesobjUser.SetInfo
This is a VB Script, this can be used by saving the file in .vbs file