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
This problem happens only with the SharePoint public images of Azure:
When resource "Computer" joins the VM to the domain, this error systematically occurs just after resource completes:
"The WS-Management service cannot process the request. The WMI service or the WMI provider returned an unknown error: HRESULT 0x80041033"
Verbose logs showing the problem
Notice that the error is not in resource Computer, but just after:
VERBOSE: [2021-01-12 15:32:34Z] [VERBOSE] [SP1]: LCM: [ Start Set ] [[Computer]JoinDomain]
VERBOSE: [2021-01-12 15:32:34Z] [VERBOSE] [SP1]: [[Computer]JoinDomain] Setting computer state for 'SP1'.
VERBOSE: [2021-01-12 15:32:34Z] [VERBOSE] [SP1]: [[Computer]JoinDomain] Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' = root\cimv2,'className' = Win32_ComputerSystem'.
VERBOSE: [2021-01-12 15:32:34Z] [VERBOSE] [SP1]: [[Computer]JoinDomain] Operation 'Enumerate CimInstances' complete.
VERBOSE: [2021-01-12 15:32:34Z] [WARNING] [SP1]: [[Computer]JoinDomain] The changes will take effect after you restart the computer SP1.
VERBOSE: [2021-01-12 15:32:35Z] [VERBOSE] [SP1]: [[Computer]JoinDomain] Added computer to domain 'contoso.local'.
VERBOSE: [2021-01-12 15:32:35Z] [VERBOSE] [SP1]: LCM: [ End Set ] [[Computer]JoinDomain] in 1.7970 seconds.
VERBOSE: [2021-01-12 15:32:35Z] [VERBOSE] [SP1]: LCM: [ End Resource ] [[Computer]JoinDomain]
VERBOSE: [2021-01-12 15:32:41Z] [ERROR] The WS-Management service cannot process the request. The WMI service or the
WMI provider returned an unknown error: HRESULT 0x80041033
VERBOSE: [2021-01-12 15:32:41Z] [VERBOSE] Operation 'Invoke CimMethod' complete.
VERBOSE: [2021-01-12 15:32:41Z] [VERBOSE] Time taken for configuration job to complete is 497.2 seconds
VERBOSE: [2021-01-12 15:32:42Z] Settings handler status to 'transitioning'
Suggested solution to the issue
I found a dirty workaround that works 90% of the time:
I edited function Set-TargetResource in DSC_Computer.psm1 to add the following if this is a SharePoint VM:
Add "Restart" to cmdlet Add-Computer
Set the flag "$global:DSCMachineStatus = 1"
The DSC configuration that is used to reproduce the issue (as detailed as possible)
It repro every time, merely by joining an AD domain:
Version of the DSC module that was used ('dev' if using current dev branch)
ComputerManagementDsc 8.4.0
The text was updated successfully, but these errors were encountered:
Yvand
changed the title
Resource Computer: error 0x80041033 when VN joins AD domain
Resource Computer: Error 0x80041033 when VM joins AD domain
Jan 12, 2021
The problem with adding the -Restart into the resource is that it will cause the resource to restart the machine - which isn't recommended - it disrupts the DSC LCM. Instead using the $global:DSCMachineStatus = 1 is the recommended approach.
Have you configured your LCM to allow reboots?
Have you tried adding a PendingReboot after the computer rename?
I created a test branch and tried many combinations before submitting this issue (PendingReboot before, after, both, xScript to force reboot before, after, both), but it never works. The only way I manage to do it is using my dirty workaround...
Details of the scenario you tried and the problem that is occurring
This problem happens only with the SharePoint public images of Azure:
When resource "Computer" joins the VM to the domain, this error systematically occurs just after resource completes:
"The WS-Management service cannot process the request. The WMI service or the WMI provider returned an unknown error: HRESULT 0x80041033"
Verbose logs showing the problem
Notice that the error is not in resource Computer, but just after:
Suggested solution to the issue
I found a dirty workaround that works 90% of the time:
I edited function Set-TargetResource in DSC_Computer.psm1 to add the following if this is a SharePoint VM:
The DSC configuration that is used to reproduce the issue (as detailed as possible)
It repro every time, merely by joining an AD domain:
I made an az cli script that creates a DC and a SP VM and fully repro from scratch:
The operating system the target node is running
It reproduces on SharePoint 2019/2016/2013 public images of Azure. Below is the output for the SharePoint 2019 VM:
Version and build of PowerShell the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
ComputerManagementDsc 8.4.0
The text was updated successfully, but these errors were encountered: