StephenTheTech
-
Posts
5 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by StephenTheTech
-
-
$user= get-wmiobject -class win32_computersystem | select-object username
wmic UserAccount where name=$User set Passwordexpires=true
net user $env:USERNAME /logonpasswordchg:yesI typed it wrong that time, this is copy and pasted from Pulseway. My problem isnt with lines 1 and 2....line 3 is broke, more specifically the username variable is broke
-
I have been beating my head against this for a while. I can these commands locally and they work fine, but when I use Pulseway they throw errors on the variable for the username. I have tried running all in one script from powershell and I have broke it up in to two scripts the first 2 line being in powershell (which works as intended) and the second line in batch (also tried running manually from terminal). Im sure there is something small I am doing wrong and I would appreciate the help, thanks
$user= get-wmiobject-class win32_computersystem | select-object username
wmic UserAccount where name=$User set Passwordexpires=true
net user $env:USERNAME /logonpasswordchg:yesI dont have a domain for GPO
-
I would like a script that would allow me to lock the pulseway agent so changes cant be made, without me having to go to each computer to lock it.
-
This is something I would be interested in also. I would like users to have to change the Local user account password on next reboot.
Force local user account password change
in Requests
Posted