views:

95

answers:

1

Hi,

I am running the following command.

([xml](new-object net.webclient).DownloadString( "http://blogs.msdn.com/powershell/rss.aspx" )).rss.channel.item | format-table title,link

The answer shows me that one rss items has the text "You Don’t Have to Be An Administrator to Run Remote PowerShell Commands"

So, the question is; why the mix up in characters in Don't?? How would I get the correct character in the powershell standard out-put?

Best regards elgrego

+3  A: 

You need to set the encoding property of the webclient:

$wc = New-Object System.Net.WebClient
$wc.Encoding = [System.Text.Encoding]::UTF8
([xml]$wc.DownloadString( "http://blogs.msdn.com/powershell/rss.aspx" )).rss.channel.item | format-table title,link
Filburt