Quantcast
Channel: Group Policy forum
Viewing all articles
Browse latest Browse all 19997

Powershell startup script doesn't work

$
0
0

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?



Viewing all articles
Browse latest Browse all 19997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>