# Problem running ConfigureRemotingforAnsible.ps1 on Windows Server 2008 R2 SP1

**URL:** <https://forum.ansible.com/t/problem-running-configureremotingforansible-ps1-on-windows-server-2008-r2-sp1/20737>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [March 1, 2016, 9:59pm UTC](https://forum.ansible.com/t/problem-running-configureremotingforansible-ps1-on-windows-server-2008-r2-sp1/20737 "2016-03-01T21:59:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fahd\_Ajmal](https://avatars.discourse-cdn.com/v4/letter/f/58956e/32.png) [@Fahd\_Ajmal](https://forum.ansible.com/u/Fahd_Ajmal)\
**Post date:** [March 1, 2016, 9:59pm UTC](https://forum.ansible.com/t/problem-running-configureremotingforansible-ps1-on-windows-server-2008-r2-sp1/20737/1 "2016-03-01T21:59:11Z")

</div>

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()
- 

```auto

```

- CategoryInfo : NotSpecified: (🙂 , TargetInvocationException
- FullyQualifiedErrorId : ComMethodTargetInvocation

PS C:\Windows\system32\>

`

Please advise what may be causing the error.

Regards,  
Fahd
