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
Details of the scenario you tried and the problem that is occurring
An exception occurs when deploying an xADComputer resource that sets the ServicePrincipalNames to an empty string when the Computer currently has one or more values present in the property.
Verbose logs showing the problem
VERBOSE: [MSTEST01]: [] Starting consistency engine.
VERBOSE: [MSTEST01]: [] A pending configuration exists. DSC will process a set request on the pending configuration.
VERBOSE: [MSTEST01]: LCM: [ Start Resource ] [[xADComputer]Contoso\ExampleComputer]
VERBOSE: [MSTEST01]: LCM: [ Start Test ] [[xADComputer]Contoso\ExampleComputer]
VERBOSE: [MSTEST01]: [[xADComputer]Contoso\ExampleComputer] Determining the current state of the computer account 'ExampleComputer'. (ADC0006)
VERBOSE: [MSTEST01]: [[xADComputer]Contoso\ExampleComputer] Retrieving the information about the computer account 'ExampleComputer' from Active Directory. (ADC0002)
VERBOSE: [MSTEST01]: [[xADComputer]Contoso\ExampleComputer] The computer account 'ExampleComputer' is present in Active Directory. (ADC0003)
Cannot bind argument to parameter 'ServicePrincipalNames' because it is an empty string.
+ CategoryInfo : InvalidData: (:) [], CimException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Test-ServicePrincipalNames
+ PSComputerName : localhost
VERBOSE: [MSTEST01]: [[xADComputer]Contoso\ExampleComputer] The computer account 'ExampleComputer' is in the desired state. (ADC0011)
VERBOSE: [MSTEST01]: LCM: [ End Test ] [[xADComputer]Contoso\ExampleComputer] in 5.7210 seconds.
The PowerShell DSC resource '[xADComputer]Contoso\ExampleComputer' with SourceInfo 'C:\Users\administrator.AD\Documents\WindowsPowerShell\xadcomputer.ps1::13::9::xADComputer' threw one or more
non-terminating errors while running the Test-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : NonTerminatingErrorFromProvider
+ PSComputerName : localhost
Suggested solution to the issue
In the 'Test-ServicePrincipalNames' function, add the AllowEmptyString attribute to the ServicePrincipalNames parameter.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
Details of the scenario you tried and the problem that is occurring
An exception occurs when deploying an
xADComputer
resource that sets theServicePrincipalNames
to an empty string when the Computer currently has one or more values present in the property.Verbose logs showing the problem
Suggested solution to the issue
In the 'Test-ServicePrincipalNames' function, add the
AllowEmptyString
attribute to the ServicePrincipalNames parameter.The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
The text was updated successfully, but these errors were encountered: