Unescape

 

Definition: Decodes a string encoded with the Escape function.

 

Suppose someone hands you a string value like this one, a value that has been encoded using the VBScript Escape function (or its equivalent):

 

http%3a%2f%2fwww.microsoft.com%2ftechnet%2fscriptcenter%2fdefault.mspx

 

Can you use Windows PowerShell to decode this value (that is, turn it back into a regular string value)? You can if you use the .Net Framework’s System.Web.HTTPUtility class and the URLDecode() method. Assuming that the string value is stored in the variable $a these two commands should do the trick:

 

[Reflection.Assembly]::LoadWithPartialName("System.Web")
$a = [web.httputility]::urldecode($a)

 

When you run the commands and then echo back the value of $a you should get the following:

 

http://www.microsoft.com/technet/scriptcenter/default.mspx

 

 

 

 

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.