Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADForestProperties: ServicePrincipalNameSuffix and UserPrincipalNameSuffix Cannot be Cleared #548

Closed
X-Guardian opened this issue Jan 16, 2020 · 0 comments · Fixed by #549
Assignees
Labels
bug The issue is a bug.

Comments

@X-Guardian
Copy link
Contributor

Details of the scenario you tried and the problem that is occurring

The ADForestProperties resource does not currently allow the ServicePrincipalNameSuffix and UserPrincipalNameSuffix to be cleared.

Verbose logs showing the problem

PS> (Get-ADForest).UpnSuffixes
fabrikam.com

PS> Invoke-DscResource -Name ADForestProperties -ModuleName ActiveDirectoryDsc -Method Set `
    -Property @{ForestName='contoso.com';UserPrincipalNameSuffix=@('')} -Verbose

VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = Resourceset,'className' =
MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer DC01-2019 with user sid
S-1-5-21-3553084080-2500667019-4197401787-500.
VERBOSE: [DC01-2019]: LCM:  [ Start  Set      ]  [[ADForestProperties]DirectResourceAccess]
VERBOSE: [DC01-2019]: LCM:  [ End    Set      ]  [[ADForestProperties]DirectResourceAccess]  in 1.3440 seconds.
VERBOSE: [DC01-2019]: LCM:  [ End    Set      ]    in  2.6720 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.

PS> (Get-ADForest).UpnSuffixes
fabrikam.com

Suggested solution to the issue

Modify the code to check for empty ServicePrincipalNameSuffix and UserPrincipalNameSuffix parameters and set the relevant Set-AdForest parameter to $null.

The operating system the target node is running

OsName               : Microsoft Windows Server 2019 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 1809
WindowsBuildLabEx    : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Version and build of PowerShell the target node is running

Name                           Value
----                           -----
PSVersion                      5.1.17763.316
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.316
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Version of the DSC module that was used

5.0.0

@X-Guardian X-Guardian self-assigned this Jan 16, 2020
@X-Guardian X-Guardian added bug The issue is a bug. in progress The issue is being actively worked on by someone. labels Jan 16, 2020
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants