Closed albvar closed 2 years ago
I can't reproduce the problem with ProxyAddresses
, are you sure that it is that property that make it throw?
Running this works (using v6.2.0):
Invoke-DscResource -Name ADUser -ModuleName ActiveDirectoryDsc -Method Set -Property @{
DomainName = 'company.local'
UserName = 'simone.niccol'
Password = $mockDomainUserCredential
ProxyAddresses = @(
'SMTP:simone.niccol@company.local'
)
Credential = $mockDomainUserCredential
} -Verbose
Result:
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = ResourceGet,'className' = MSFT_DSCLocalConfigurationManager,'namespaceN
ame' = root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer DC01 with user sid S-1-5-21-580101038-1291350449-3907825012-500.
VERBOSE: [DC01]: [[ADUser]DirectResourceAccess] Retrieving 'simone.niccol' from domain 'company.local'. (ADU0004)
VERBOSE: [DC01]: [[ADUser]DirectResourceAccess] 'simone.niccol' is present in domain 'company.local'. (ADU0007)
VERBOSE: [DC01]: LCM: [ End Get ] [[ADUser]DirectResourceAccess] in 0.1240 seconds.
VERBOSE: [DC01]: LCM: [ End Set ] in 0.1880 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
Bizarre, I updated to the latest version 6.2.0 and using the same exact payload the error was gone and the ProxyAddresses field was populated. Lesson learned, before asking for help make sure I am running latest version. Sorry for the lack of response, this is a Friday - Sunday project for me. Thanks for all you do!
After updating from 6.0.1 to 6.2.0 I was no longer experiencing this issue.
Problem description
I am passing in ProxyAddresses, I copied this from the MOF itself. The value is not null and seems to be treating the value as a string[]. The AD user is created but it does not populate ProxyAddresses. If I omit ProxyAddresses I no longer see the issue. ProxyAddresses = { "SMTP:myuser.last@email.com" };
Verbose logs
DSC configuration
Suggested solution
N/A
Operating system the target node is running
PowerShell version and build the target node is running
ActiveDirectoryDsc version