I'm not sure what I'm missing or if this is a bug but would appreciate thoughts.
The script below produces an error when used in Powershell but not ISE.
Originally I thought this might be a bug in an early version of PowerShell but I've since
upgraded to 5.1.14409.1005 and its still happens. Oddly enough the intellisense in ISE says
it can't find the type either but it doesn't error out on run.
Here is the error.
"Unable to find type [Microsoft.PowerShell.Commands.HtmlWebResponseObject]"