• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

PowerShell and ampersand

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More

View previous topic :: View next topic  
Author Message
graycat
SF Mod
SF Mod


Joined: 29 Apr 2005
Posts: 16777195
Location: London, UK

Offline

PostPosted: Mon Aug 15, 2011 5:15 pm    Post subject: PowerShell and ampersand Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ryansutton
Trusted SF Member
Trusted SF Member


Joined: 25 Aug 2004
Posts: 67
Location: San Francisco, California

Offline

PostPosted: Tue Aug 16, 2011 1:54 am    Post subject: Reply with quote

Can you copy and paste the symbol?
Back to top
View user's profile Send private message
graycat
SF Mod
SF Mod


Joined: 29 Apr 2005
Posts: 16777195
Location: London, UK

Offline

PostPosted: Tue Aug 16, 2011 12:36 pm    Post subject: Reply with quote

I've tried copying and pasting the whole folder path in but it makes no difference unfortunately. Sad
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ryansutton
Trusted SF Member
Trusted SF Member


Joined: 25 Aug 2004
Posts: 67
Location: San Francisco, California

Offline

PostPosted: Tue Aug 16, 2011 4:22 pm    Post subject: Reply with quote

There might be a keyboard shortcut for the "&" symbol on the character map. Short of that I don't know. =[
Back to top
View user's profile Send private message
graycat
SF Mod
SF Mod


Joined: 29 Apr 2005
Posts: 16777195
Location: London, UK

Offline

PostPosted: Tue Aug 16, 2011 4:30 pm    Post subject: Reply with quote

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 ......
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
AdamV
SF Mod
SF Mod


Joined: 06 Oct 2004
Posts: 24
Location: Leeds, UK

Offline

PostPosted: Fri Aug 19, 2011 1:16 am    Post subject: Reply with quote

Does it work if you enclose it in single quotes (apostrophes)? That should suppress the escape character behaviour.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Looking for more Windows Networking info?

Sign up to the WindowsNetworking.com Monthly Newsletter, written by Enterprise Security MVP Deb Shinder, containing news, the hottest tips, Networking links of the month and much more. Subscribe today and don't miss a thing!
View a sample newsletter.

Become a WindowsNetworking.com member!

Discuss your Windows Networking issues with thousands of other Windows Newtorking experts. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred data recovery solution?

Follow TechGenix on Twitter