We deployed quite some Win10 Pro machines with sysprep, which disabled the local admin account and created a local user (member of admin group).
Problem is that after a while we discovered that this local account's password will expire after x days. I thought of making a GPO with a startup Powershell script with the following command: wmic useraccount where "Name='ICT'" set PasswordExpires=false
When I manually run this command the specific account is set with the setting that it's password won't expire (so it is working). When I run it in a startup script (GPO) nothing happens.
When I for example replace this command with the following it will execute, so I know it's the script and no other issue: copy c:\test.txt c:\intel
As far as I know a startup script through GPO always runs with elevated privileges. What could this be then?