# Compile-Help.ps1 # by Jeff Hillman # # this script uses the text and XML PowerShell help files to generate HTML help # for all PowerShell Cmdlets, PSProviders, and "about" topics. the help topics # are compiled into a .chm file using HTML Help Workshop. param( [string] $outDirectory = ".\PSHelp", [switch] $GroupByPSSnapIn ) function Html-Encode( [string] $value ) { # System.Web.HttpUtility.HtmlEncode() doesn't quite get everything, and # I don't want to load the System.Web assembly just for this. I'm sure # I missed something here, but these are the characters I saw that needed # to be encoded most often $value = $value -replace "&(?![\w#]+;)", "&" $value = $value -replace "<(?!!--)", "<" $value = $value -replace "(?