Rob wrote:
[Quoted Text] > We are about to rollout Certificates. Does anyone have a script or can > point > me to one that modify's an existing users account "smart card is required > for > interactive logon" > I really don't want to have to modify manually.
A bit of the userAccountControl attribute determines this. To set this bit for one user, you Or the attribute value with the appropriate bit mask: ================== Const ADS_UF_SMARTCARD_REQUIRED = &H40000
' Bind to user object. Set objUser = GetObject("LDAP://cn=Jim Smith,ou=Sales,dc=MyDomain,dc=com") ' Retrieve value of userAccountControl. lngFlag = objUser.userAccountControl ' Set bit for smartcard required. lngFlag = lngFlag Or ADS_UF_SMARTCARD_REQUIRED ' Assign new value. objUser.userAccountControl = lngFlag ' Save changes. objUser.SetInfo =================
-- Richard Mueller Microsoft MVP Scripting and ADSI Hilltop Lab - http://www.rlmueller.net --
|