Powershell-Utility
Powershell-Utility copied to clipboard
Podcast XML formating
In reference to your Podcast PowerShell Module. First of all this is an excellent module it was exactly what I was looking for. I did however find one annoying podcast that appears to have an XML BOM at the start of "???" It appears that this then wont load in as XML as the parser throws an error. http://www.john00fleming.co.uk/mixes/podcasts/Nov08/podcast.xml I fixed it by using quick check Try { [String]$PodcastString = Invoke-WebRequest -Uri $PodcastURL If($PodcastString -like '???*') { $Trim = [String]$PodcastString.TrimStart("???") [xml]$PodcastFeed = $Trim } Else { [xml]$PodcastFeed = Invoke-WebRequest -Uri $PodcastURL }
There are probably better ways of doing it but hey thought you might want to know.