Share via

Powershell: quoted-string function parameters

Anonymous
2009-11-24T17:34:21+00:00

The Powershell function call mechanism appears to use white space, quote (") and/or apostrophe (') as delimiters for parameters passed to a function.  Is it possible to pass a quoted string, including the quotes or apostrophes to a function?

e.g.:  function FX ([string]$PARAM)

         if ($PARAM.Substring(0) -eq "'") {return $true}  # first character is apostrophe

         return $false}

...

if ((FX 'string') -eq $true) {do something}

...

Windows for home | Previous Windows versions | Windows update

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2009-11-25T12:08:26+00:00

Hi phredd45,

Welcome to Microsoft Answers!!!

The issue you posted would be better suited in the MSDN community . Please visit the link below to find a community that will offer the best support.

http://social.msdn.microsoft.com/Forums/en-US/categories

Regards

Varun J: MICROSOFT SUPPORT

Visit our Microsoft Answers Feedback Forum

http://social.answers.microsoft.com/Forums/en-US/answersfeedback/threads/ and let us know what you think


Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful