Unable to find type [System.Web.HttpUtility] in PowerShell
Unable to find type [System.Web.HttpUtility] in PowerShell
Unable to find type [System.Web.HttpUtility] in PowerShell
Re: Unable to find type [System.Web.HttpUtility] in PowerShell
You need to load the `System.Web` assembly. Use the `Add-Type` cmdlet like so,
```
PS C:\> [System.Web.HttpUtility]::UrlEncode("www.google.com")
Unable to find type [System.Web.HttpUtility].
PS C:\> Add-Type -AssemblyName System.Web
PS C:\> [System.Web.HttpUtility]::UrlEncode("www.google.com")
www.google.com
```
```
PS C:\> [System.Web.HttpUtility]::UrlEncode("www.google.com")
Unable to find type [System.Web.HttpUtility].
PS C:\> Add-Type -AssemblyName System.Web
PS C:\> [System.Web.HttpUtility]::UrlEncode("www.google.com")
www.google.com
```