Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Set local password with secure startup script

$
0
0

Since CPassword has been deprecated by MSFT, I need a secure method to set the password of the local administrator on all workstations. The workaround script that MSFT provided inthe kb article won't work because I have no control over when a computer is on or off. Hence my desire to use a startup script. I logon script would be fine too, but I suspect that wouldn't work since the end users don't have access to set these passwords.

I can set the password with these commands:

$objUser = [ADSI]"WinNT://./LocalAdmin"
$objUser.SetPassword("NewPassword")

but that exposes the password in the script in plain text, which is worse than the CPassword problem that MSFT "fixed."

So, how can I do this same thing and use a predetermined password without putting it into a logon/startup script in plain text?

Thanks in advance!


Blog / Facebook / Twitter


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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