Ok. This is the code I am using. I am not an expert in coding. just using a code available and tweaking as per my requirement. Tried different methods like .accountdisabled = True, but it didn't worked. Hope you can assist me to complete this.
'Script deletes Users from a csv file.
'csv format...
Can someone guide me how to disable the user instead of delete the user
Sub DelUser
Dim objOU
Set objOU = GetObject(strOU)
objOU.Delete "User", "cn=" & strUserCN & "" ' instead of delete, I need to disable user
Set ObjOU = Nothing
strUserCN = ""
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.