Knife bootstrap throwing unkown error

When perfroming knife bootstrap from a windows powershell, I am getting the following error

**syntax error near unexpected token `$'{\r''**
**'h: -c: line 14: `exists() {**

Not sure where exactly this error is raising from. Can someone help me on this.