“ ` ” is not equal to “ ‘ ” (Escape Character for Powershell is Back Quote, not Single Quote…)

Was busy writing powershell script and met some issue… Troubleshoot for a while and wonder what went wrong till I look carefully on what I was using… We had a good laugh in the end… I went to use Single Quote as Escape Character instead of the Back Quote.. LOL~

So, I think I will share this information with you all~ And to remind myself of my silly mistake…

Quick Summary

Escape character for Powershell is back quote – “ ` ” The button beside on the left of  “1” on the Keyboard (My Laptop).

Just in case you are not sure where is the Single Quote is “ ‘ ” – The button beside on the left of the “Enter” button on the Keyboard.

One good Website to Share

http://www.techotopia.com/index.php/Windows_PowerShell_1.0_String_Quoting_and_Escape_Sequences

The website has good example to explain to you when to use double quote and single quote too! Good one!

So, Happy Reading and Scripting!! Smile

Advertisements
This entry was posted in PowerShell and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s