Skip to content

ADMF cannot remove a deleted computer from a gMSA #73

Description

@dbeugger

ADMF cannot remove a deleted computer from a gMSA.

Prerequisites

  • There is a gMSA. Two computers are assigned to it via ComputerName.
  • One of the computers was deleted.

Steps Leading to the Error

If you run Invoke-ADMFDomain -Options ServiceAccount, you will receive an error:

“Get-ADObject: Cannot find an object with identity: ‘S-1-5-...’ under:
%DomainDN%”

Workaround

You can correct this manually using Set-ADServiceAccount.

Script

The error can be reproduced using the files in the ZIP archive.

Invoke-Issue.ps1

  • creates an OU using ADMF
  • creates two computer objects
  • creates a gMSA using ADMF with both computers as authorized.
  • deletes one of the computers
  • Checks the gMSA using ADMF to ensure both computers are authorized. This then leads to the error

Remove-OU.ps1

  • Removes all objects in the created OU and then the OU itself

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions