Problem with PowerShell SQL update character

I have a PowerShell script that is running an Update query to a list of servers, but somehow a character keeps disappearing when the command executes.

I'm trying to update the record to 'EHASH\VIeuCdf~euko`ep`MRMpJ@'
But instead it updates to 'EHASH\VIeuCdf~eukoepMRMpJ@'

Somehow the ` character is dropped, does anyone know why?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JenH2Author Commented:
Ok, so I see that ` is a special escape character, so now the quest is how do I get that character to be used as part of a text string?
JenH2Author Commented:
Nevermind, figured it out.
Can you post how you did it, in case someone else wants to know?


JenH2Author Commented:
Originally my update was like this:

UPDATE table SET column = 'EHASH\VIeuCdf~euko`ep`MRMpJ@' WHERE something = something

To get it to work I did this:

$newdata = 'EHASH\VIeuCdf~euko`ep`MRMpJ@'   <--you need the single quote around the string so it won't treat ` as an escape.
UPDATE table SET column = '$newdata' WHERE something = something

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Thanks! D
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.