Skip to content

gplink and the use of name mapping in PolicyName #72

Description

@dbeugger

Hi

I encountered a special Issue with a gplink definition
If we have GPO with Domain specific settings we add a postfix with the uppercase domain name
GPO used in all doamin: 'Test'
GPO with settings specific to the domain: 'Test_CONTOSO'
The following ADMF definition works without any problem, event when i user a lowercase postfix (PolicyName = 'Test_contos')

@(
    @{
        PolicyName         = Test_CONTOSO' 
        OrganizationalUnit = '%DomainDN%'
        Precedence         = 999
    }
)

The GPO is already link and enabled.
When i use 'Test_%DomainName%', i get form Test-ADMFDomain the following change:

$Test = Test-AdmfDomain -Options GPLink -Server (Get-ADDomain).DNSRoot
$Test

Server          Type       ObjectType Identity                                Changed
------          ----       ---------- --------                                -------
dc1.contoso.com Update     GPLink     OU=Domain Controllers,DC=contoso,DC=com {State: Test_contos}

$Test  | % changed

Action Policy         Status  Identity
------ ------           ------  --------
State  Test_contos Enabled OU=Domain Controllers,DC=contoso,DC=com

Only when i use the name mapping %DomainDN% or %RootDomainDN%., i get the change. If i "hardcode the domain postfix in lower or upercase it does not show.
The GPO link is enabled.

As a workaround i use 'Test_{0}' -f (Get-ADDomain).Name

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