TrimarcJake / Locksmith

A small tool built to find and fix common misconfigurations in Active Directory Certificate Services.

Home Page:https://github.com/TrimarcJake/Locksmith

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

We're checking for Restricted Admin Mode twice

SamErde opened this issue · comments

This appears to be a leftover from a previous PR that "moved" the Restricted Admin Mode check to the beginning of the script. I forgot to remove it here:
https://github.com/TrimarcJake/Locksmith/blob/2d54c5b1171f4a8c392e0b21a3a00eb7dd258149/Public/Invoke-Locksmith.ps1#L163C7-L163C7

    if (!$Credential -and (Get-RestrictedAdminModeSetting)) {
        Write-Warning "Restricted Admin Mode appears to be in place, re-run with the '-Credential domain\user' option"
        break;
    }