Problem running ConfigureRemotingforAnsible.ps1 on Windows Server 2008 R2 SP1

Hi All,

I am try to run {ConfigureAnsibleforRemoting.ps1} on Windows Server 2008 R2 SP1. it works on most servers but is throwing the following exception on some:

`

PS C:\Windows\system32> E:\staging\ConfigureRemotingForAnsible.ps1
Exception has been thrown by the target of an invocation.
At E:\staging\ConfigureRemotingForAnsible.ps1:46 char:5

  • $key.Create()
  • CategoryInfo : NotSpecified: (:slight_smile: , TargetInvocationException
  • FullyQualifiedErrorId : ComMethodTargetInvocation

PS C:\Windows\system32>

`

Please advise what may be causing the error.

Regards,
Fahd