# Ansible 2.0 parameter escaping problem

**URL:** <https://forum.ansible.com/t/ansible-2-0-parameter-escaping-problem/20286>\
**Category:** Ansible Project\
**Created:** [January 20, 2016, 6:39am UTC](https://forum.ansible.com/t/ansible-2-0-parameter-escaping-problem/20286 "2016-01-20T06:39:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rob\_White](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@Rob\_White](https://forum.ansible.com/u/Rob_White)\
**Post date:** [January 20, 2016, 6:39am UTC](https://forum.ansible.com/t/ansible-2-0-parameter-escaping-problem/20286/1 "2016-01-20T06:39:45Z")

</div>

I’ve starting seeing the following problem since I upgraded to Ansible v2.0

Here’s the task:

`

raw:

PowerShell “C:\Temp\db\_scripts\copy\_db\_file.ps1” "{{ system\_db\_default\_location }}/master.mdf" "{{ system\_db\_master\_mdf\_location }}/master.mdf"

`

It used to work fine in Ansible 1.9 but now I get a PowerShell error:

“stderr”: “The string is missing the terminator: ".\r\n + CategoryInfo : ParserError: (🙂 , ParentContainsErrorRecordEx \r\n ception\r\n + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString\r\n \r\n”

This is obviously something to do with the way Ansible has changed how it handles escaped characters but I’ve tried a number of other different options for escaping my task and i can’t get it to work.

I appreciate any suggestions.

---

<div class="post-metadata">

**Author:** ![Rob\_White](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@Rob\_White](https://forum.ansible.com/u/Rob_White)\
**Post date:** [January 21, 2016, 7:33am UTC](https://forum.ansible.com/t/ansible-2-0-parameter-escaping-problem/20286/2 "2016-01-21T07:33:31Z")

</div>

After much base64 decoding of Powershell commands the following will work:

raw:

C:\Temp\db\_scripts\copy\_db\_file.ps1 “{{ system\_db\_default\_location }}/master.mdf” “{{ system\_db\_master\_mdf\_location }}/master.mdf”

I removed the PowerShell call at the beginning, unquoted the script path and then removed the escaping slash \ before the quotation marks around the arguments.

Hopefully this will help somebody!
