Sub passwordExpires(userName)
Dim users
Set users = GetObject("winmgmts:
{impersonationLevel=impersonate}").InstancesOf("Win32_useraccount")
For Each user In users
if user.Name = userName then
passwordExpires = user.PasswordExpires
end if
Next
End Sub
Dim users
Set users = GetObject("winmgmts:
{impersonationLevel=impersonate}").InstancesOf("Win32_useraccount")
For Each user In users
if user.Name = userName then
passwordExpires = user.PasswordExpires
end if
Next
End Sub