Hi,
I need a script to check the status of this parameter in AD, anybody idea's? It should fit in this code
Dim objconnection, objcommand, objrecordset, objuser, objproperty
Set objconnection = CreateObject("ADODB.Connection")
Set objcommand = CreateObject("ADODB.Command")
objconnection.Provider = "ADsDSOObject"
objconnection.Open "Active Directory Provider"
Set objcommand.ActiveConnection = objconnection
objcommand.Properties("Page Size") = 1000
objcommand.Properties("Timeout") = 30
objcommand.Properties("Searchscope") = 2
objcommand.Properties("Cache Results") = False
On Error Resume Next
objcommand.CommandText = _
"Select * from 'LDAP://dc=indaver,dc=int'" & " where samaccountname='" & wscript.arguments(0) & "'"
Set objrecordset = objcommand.Execute
objrecordset.MoveFirst
Set objuser = GetObject(objrecordset.Fields("ADsPath").Value)
<CHECK IF USER CANNOT CHANGE PASSWORD IS ENABLED OR NOT>
objproperty = Null
I need a script to check the status of this parameter in AD, anybody idea's? It should fit in this code
Dim objconnection, objcommand, objrecordset, objuser, objproperty
Set objconnection = CreateObject("ADODB.Connection")
Set objcommand = CreateObject("ADODB.Command")
objconnection.Provider = "ADsDSOObject"
objconnection.Open "Active Directory Provider"
Set objcommand.ActiveConnection = objconnection
objcommand.Properties("Page Size") = 1000
objcommand.Properties("Timeout") = 30
objcommand.Properties("Searchscope") = 2
objcommand.Properties("Cache Results") = False
On Error Resume Next
objcommand.CommandText = _
"Select * from 'LDAP://dc=indaver,dc=int'" & " where samaccountname='" & wscript.arguments(0) & "'"
Set objrecordset = objcommand.Execute
objrecordset.MoveFirst
Set objuser = GetObject(objrecordset.Fields("ADsPath").Value)
<CHECK IF USER CANNOT CHANGE PASSWORD IS ENABLED OR NOT>
objproperty = Null