You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DialogParametersparameters=newDialogParameters{["ContentText"]=$"Clear LAPS {version} Password on Computer '{computer.Name}' ?{Environment.NewLine}You have to invoke gpupdate /force on computer '{computer.Name}' in order so set a new LAPS password",["CancelButtonText"]="Cancel",["ConfirmButtonText"]="Clear",["ConfirmButtonColor"]=Color.Error};
62
+
DialogParametersparameters=new(){["ContentText"]=$"Clear LAPS {version} Password on Computer '{computer.Name}' ?{Environment.NewLine}You have to invoke gpupdate /force on computer '{computer.Name}' in order so set a new LAPS password",["CancelButtonText"]="Cancel",["ConfirmButtonText"]="Clear",["ConfirmButtonColor"]=Color.Error};
63
63
IDialogReferencedialog=awaitDialog.ShowAsync<Confirmation>("Clear LAPS Password",parameters,newDialogOptions(){NoHeader=true});
Snackbar.Add($"LAPS {version} Password for computer '{computer.Name}' successfully cleared! - Please invoke gpupdate on {computer.Name} to set a new LAPS Password",Severity.Success);
71
+
Snackbar.Add($"LAPS {version} Password for computer '{computer.Name}' successfully cleared! - Please invoke 'gpupdate' on {computer.Name} to set a new LAPS Password",Severity.Success);
.Information("LAPS password cleared for computer '{ComputerName}' (LAPS version: {LAPSVersion}) by user '{UserName}'",computer.Name,version,currentUsername);
Domaindomain=_domains.Value.SingleOrDefault(x =>x.Name==domainName)??thrownewException($"No configured domain found with name {domainName}");
141
141
142
+
Log.ForContext("Audit",true)
143
+
.Information("Retrieving Active Directory computer details for DN '{DistinguishedName}' using user '{Username}'",distinguishedName,ldapCredential.UserName);
144
+
142
145
if(ldapCredentialisnull)
143
146
{
144
147
thrownewException("Failed to get LDAP Credentials");
.Information("Successfully retrieved LAPS v1 password for computer '{ComputerName}' (DN: '{DistinguishedName}') by user '{Username}'",adComputer.Name,distinguishedName,ldapCredential.UserName);
.Information("Successfully retrieved LAPS v2 password for computer '{ComputerName}' (DN: '{DistinguishedName}') by user '{Username}'",adComputer.Name,distinguishedName,ldapCredential.UserName);
.Information("Successfully retrieved LAPS v2 password history for computer '{ComputerName}' (DN: '{DistinguishedName}') by user '{Username}'",adComputer.Name,distinguishedName,ldapCredential.UserName);
243
253
}
244
254
else
245
255
{
246
-
Log.Warning("Failed to decrypt LAPS History entry");
256
+
Log.ForContext("Audit",true)
257
+
.Warning("Failed decrypt LAPS v2 password history for computer '{ComputerName}' (DN: '{DistinguishedName}') by user '{Username}'",adComputer.Name,distinguishedName,ldapCredential.UserName);
thrownewArgumentException("Failed to decrypt LAPSv2 Password");
317
+
thrownewArgumentException("Decrypt LAPS Password failed. Please check if Domain Controllers are reachable and your python environment is setup correctly");
0 commit comments