I am trying to use the pwdlastset to change first to a 0 and then to a -1
basically I have a bunch of users who had password never expires. We sent out emails over the last couple of weeks asking them to reset passwords and then we would remove the password never expires so that they are not locked out.
What happened next is that many didnt do anything. I was then assigned the task of going into the attribute editor manually and goign to pwdlastset and chang it to 0 and then to -1 and after that going in and removing the password never expires so the users are logged out.
this task is taking alot of time manually and I figured I might be able to automate parts of it but I find that I cannot evne use the PWDlastset
----------------------------
Set-ADUser john.doe -properties pwdlastset = 0
Set-ADUser : A parameter cannot be found that matches parameter name 'properties'.
At line:1 char:27
+ Set-ADUser john.doe -properties pwdlastset = 0
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-ADUser], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.ActiveDirectory.Management.Commands.SetADUser
----------------------------
So basically I cannot even try to get started on figuring out a way to make this task less manual as I cannot get the main attribute to change in powershell.
thanks for the help