Showing posts with label machine password reset. Show all posts
Showing posts with label machine password reset. Show all posts

Monday, March 23, 2015

force a machine password change


nltest.exe /sc_change_pwd:mydomain.corp.mycompany.com


now with more info...
http://blogs.msdn.com/b/sudhakan/archive/2010/01/07/experimenting-with-windows-machine-account-passwords-and-vm-snapshots.aspx

Friday, June 29, 2012

Machine Password

Text file with list of servers WindowsServers.txt

Grab the data

$CAITInfo = Get-Content .\CAITWindowsServers.txt | Foreach {get-adcomputer $_ -properties PasswordLastSet}

Filter and display
$CAITInfo | Sort-Object -descending PasswordLastSet | FT -property DNSHostname,PasswordLastSet

Grab Older than 30 days... which means either problem? or machine password not updating..
$CAITInfo | Sort-Object -descending PasswordLastSet|Where { $_.PasswordLastSet -lt (Get-Date).AddDays(-30)} |
FT -property DNSHostname,PasswordLastSet

To force a PC\server to reset machine password to AD (where not a DC)
nltest.exe /sc_change_pwd:lc.local

wonder if I can do that via powershell :)