Updates from: 04/08/2021 03:12:07
Service Microsoft Docs article Related commit history on GitHub Change details
Microsoft.PowerShell.Utility Invoke Webrequest (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Invoke-WebRequest.md
each operating system and platform.
To test a website with the standard user agent string that is used by most Internet browsers, use the properties of the [PSUserAgent](/dotnet/api/microsoft.powershell.commands.psuseragent) class, such as Chrome, FireFox, InternetExplorer, Opera, and Safari. For example, the following command
-uses the user agent string for Internet Explorer
+uses the user agent string for Internet Explorer:
+`Invoke-WebRequest -Uri https://website.com/ -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer)`
```yaml Type: System.String
Microsoft.PowerShell.Utility Invoke Webrequest (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md
the properties of the [PSUserAgent](/dotnet/api/microsoft.powershell.commands.ps
such as Chrome, FireFox, InternetExplorer, Opera, and Safari. For example, the following command uses the user agent string for Internet Explorer:-
-```powershell
-Invoke-WebRequest -Uri https://website.com/ -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer)
-```
+`Invoke-WebRequest -Uri https://website.com/ -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer)`
```yaml Type: System.String
Microsoft.PowerShell.Utility Invoke Webrequest (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Invoke-WebRequest.md
the properties of the [PSUserAgent](/dotnet/api/microsoft.powershell.commands.ps
such as Chrome, FireFox, InternetExplorer, Opera, and Safari. For example, the following command uses the user agent string for Internet Explorer:-
-```powershell
-Invoke-WebRequest -Uri https://website.com/ -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer)
-```
+`Invoke-WebRequest -Uri https://website.com/ -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer)`
```yaml Type: System.String
Microsoft.PowerShell.Utility Invoke Webrequest (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Invoke-WebRequest.md
the properties of the [PSUserAgent](/dotnet/api/microsoft.powershell.commands.ps
such as Chrome, FireFox, InternetExplorer, Opera, and Safari. For example, the following command uses the user agent string for Internet Explorer:-
-```powershell
-Invoke-WebRequest -Uri https://website.com/ -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer)
-```
+`Invoke-WebRequest -Uri https://website.com/ -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer)`
```yaml Type: System.String