1

We recently had an "emergency case" where we needed the local administrator on a Server. We have for every Server local admin, the same password but for any reason one Server had a diffrent one.

I now wanted to check through every Server, but I cant remote login on 160+ Servers just to check if the local admin PW is correct.

So I thougth about a powershell script to achive this but have no clue how to start of with. I first thougth about starting a PSSession with the "local admin" credentials and when the login fails it must be a sign to check this server. But as I was testing it, it even failed with the correct password.

Now I'm stranded and can't think of any quick/clean solution.

2
  • 1
    You could try psexec, available from the MS web site. If psexec can run a command on the remote system, the username and password you provided it with are good. Jun 20, 2019 at 1:31
  • @HarryJohnston thank you for the advice with this information I could dig deeper and found also the problem within my powershell thougth
    – Kevin
    Jul 4, 2019 at 8:14

2 Answers 2

2

You really don't want to reuse administrative credentials across the organization.

Microsoft's Local Administrator Password Solution (LAPS) can be used on domain-joined computers to ensure unique passwords that can be retrieved and reset when required. (https://www.microsoft.com/en-us/download/details.aspx?id=46899)

1
  • a nice advice but it is no solution for me, as this is somehting I don't make decisions on. But I will recommand this for sure.
    – Kevin
    Jun 19, 2019 at 12:08
1

There could be many Problems but mine got solved with doing a WinRM qc in an elevated privilge cmd and also adding our serverfarm to my "truested pc's"

this is done in powershell via Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value '<servername>'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .