Login Using LAPS Credentials

avatar
nperkins
Disabled

Hello all,

I tried to do a search and didn't come up with much; before I start writing a Powershell script, I thought I'd ask if anyone knows of a good way to log into a let of PCs using the administrator account I have provisioned in LAPS.

The local admin account has been renamed to $CompanyName Local Admin and the password is set to a 30 rotation through LAPS. While I can pull it up through Powershell or the UI every time I want to log into one of these PCs, I was hoping there would be a direct integration I could use to pull the attribute from AD.

All Comments (20)

avatar

Hello,

Our "Custom" Credential type was made for that purpose.

Attached is a RDM credential entry that you can import. It uses a $HOST$ parameter which will grab the host name from a session (RDP, SSH, etc) in which you specify to use your LAPS credential entry using the Credential repository mode.

So

step 1 - import this new entry

Step 2, modify an existing session to point at that credential entry.

Obviously it requires that you have the AdmPwd.PS module installed on any workstattion you run this from. It also requires that you've already registered the target host in LAPS.

Please note that the current script uses your currently logged-on windows username for the final authentication. It can easily be adapted to use another value, maybe even a custom variable that you would define in RDM.

Let us know if you have enough info to get this working.

Best regards,

Maurice

avatar
nperkins
Disabled

Maurice,

Thanks for the quick reply! I was able to get that script working for the RDP session using the LAPS username and password(s). My next question is on the Macros/Scripts/Tools page, it is possible to run the LAPS script to generate the credentials to use for Computer Management, Inventory Report, Event Viewer, etc.?

I currently have this configured on my test session:

-Tools > Credentials > Allow credentials for tools AdOn

LAPS_Script selected

avatar

Hello,

If the LAPS Credential script provided by Maurice is already configured to be used in the session's credential property, you just have to select the Use session credentials option in the Tools tab.

Best regards,

Érica Poirier