PowerShell and ampersand

Networking/Security Forums -> Programming and More

Author: graycatLocation: London, UK PostPosted: Mon Aug 15, 2011 5:15 pm    Post subject: PowerShell and ampersand
    ----
Afternoon all,

I'm running into an issue using PowerShell to manage public folder permissions in Exchange 2007 where the folder path contains an ampersand (&). Unfortunately the ampersand is an escape character and therefore cancels out of the command.

Any idea on possible work around for this? Other than renaming the folder for preference. Wink

Author: ryansuttonLocation: San Francisco, California PostPosted: Tue Aug 16, 2011 1:54 am    Post subject:
    ----
Can you copy and paste the symbol?

Author: graycatLocation: London, UK PostPosted: Tue Aug 16, 2011 12:36 pm    Post subject:
    ----
I've tried copying and pasting the whole folder path in but it makes no difference unfortunately. Sad

Author: ryansuttonLocation: San Francisco, California PostPosted: Tue Aug 16, 2011 4:22 pm    Post subject:
    ----
There might be a keyboard shortcut for the "&" symbol on the character map. Short of that I don't know. =[

Author: graycatLocation: London, UK PostPosted: Tue Aug 16, 2011 4:30 pm    Post subject:
    ----
I can get the symbol into the path no problem but PowerShell takes that as a command symbol and kicks the rest of the script out.

Bit of a bummer really as I seem to have a number of public folders with & in their path ......

Author: AdamVLocation: Leeds, UK PostPosted: Fri Aug 19, 2011 1:16 am    Post subject:
    ----
Does it work if you enclose it in single quotes (apostrophes)? That should suppress the escape character behaviour.



Networking/Security Forums -> Programming and More


output generated using printer-friendly topic mod, All times are GMT + 2 Hours

Page 1 of 1

Powered by phpBB 2.0.x © 2001 phpBB Group