I was wondering if there was an official C# way to get the LAPS password from mslaps-encryptedpassword
attribute decrypted using C#?
I know you can use the below powershell module to get the password, but I am having trouble finding documentation on how to do it in C#.
Powershell:
Get-LapsADPassword -Identity COMPUTERNAME -AsPlainText
from lapspsh.dll
I can get the value in C#, but I am unsure how to decrypt it. Looking to do this natively in C# without invoking PowerShell script/module.
Edit: msLAPS-Password (cleartext password) is not set in the new April 2023 implementation of LAPS if you choose to encrypt the password