New-CimSession error: "Illegal operation attempted on a registry key that has been marked for deletion."

  powershell, windows

When executing "$Session = New-CimSession -ComputerName $ServerName" on server: $ServerName,
will randomly get exception "Illegal operation attempted on a registry key that has been marked for deletion."

But it’s not a consistent failure. Any thought/suggestion to investigate this issue further?

Source: Windows Questions

LEAVE A COMMENT