File tree Expand file tree Collapse file tree 8 files changed +69
-8
lines changed
5.1/Microsoft.PowerShell.Utility
7.4/Microsoft.PowerShell.Utility
7.5/Microsoft.PowerShell.Utility
7.6/Microsoft.PowerShell.Utility Expand file tree Collapse file tree 8 files changed +69
-8
lines changed Original file line number Diff line number Diff line change 22external help file : Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33Locale : en-US
44Module Name : Microsoft.PowerShell.Utility
5- ms.date : 10/29/2025
5+ ms.date : 01/20/2026
66online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-5.1&WT.mc_id=ps-gethelp
77schema : 2.0.0
88aliases :
4444
4545This cmdlet is introduced in Windows PowerShell 3.0. This command can be run using the ` irm ` alias.
4646
47+ By default, the HTTP request includes default values for the following HTTP headers:
48+
49+ - ` Host `
50+ - ` User-Agent `
51+
52+ Use the ** Headers** parameter to add other headers or override the default values.
53+
4754## EXAMPLES
4855
4956### Example 1: Get the PowerShell RSS feed
Original file line number Diff line number Diff line change 22external help file : Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33Locale : en-US
44Module Name : Microsoft.PowerShell.Utility
5- ms.date : 12/16/2025
5+ ms.date : 01/20/2026
66online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-5.1&WT.mc_id=ps-gethelp
77schema : 2.0.0
88aliases :
@@ -62,6 +62,12 @@ This cmdlet was introduced in Windows PowerShell 3.0.
6262> For more information about this security update, see
6363> [PowerShell 5.1: Preventing script execution from web content](https://support.microsoft.com/KB/5074596).
6464
65+ By default, the HTTP request includes default values for the following HTTP headers:
66+
67+ - `Host`
68+ - `User-Agent`
69+
70+ Use the **Headers** parameter to add other headers or override the default values.
6571
6672This command can be run using the `iwr`, `curl`, or `wget` aliases.
6773
Original file line number Diff line number Diff line change 22external help file : Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33Locale : en-US
44Module Name : Microsoft.PowerShell.Utility
5- ms.date : 12/10/2025
5+ ms.date : 01/20/2026
66online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-7.4&WT.mc_id=ps-gethelp
77schema : 2.0.0
88aliases :
@@ -116,6 +116,14 @@ variables. See the [NOTES](#notes) section of this article.
116116Beginning in PowerShell 7.4, character encoding for requests defaults to UTF-8 instead of ASCII. If
117117you need a different encoding, you must set the ` charset ` attribute in the ` Content-Type ` header.
118118
119+ By default, the HTTP request includes default values for the following HTTP headers:
120+
121+ - ` Accept-Encoding `
122+ - ` Host `
123+ - ` User-Agent `
124+
125+ Use the ** Headers** parameter to add other headers or override the default values.
126+
119127## EXAMPLES
120128
121129### Example 1: Get the PowerShell RSS feed
Original file line number Diff line number Diff line change 22external help file : Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33Locale : en-US
44Module Name : Microsoft.PowerShell.Utility
5- ms.date : 12/10/2025
5+ ms.date : 01/20/2026
66online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-7.4&WT.mc_id=ps-gethelp
77schema : 2.0.0
88aliases :
@@ -105,6 +105,14 @@ variables. See the [Notes](#notes) section of this article.
105105Beginning in PowerShell 7.4, character encoding for requests defaults to UTF-8 instead of ASCII. If
106106you need a different encoding, you must set the ` charset ` attribute in the ` Content-Type ` header.
107107
108+ By default, the HTTP request includes default values for the following HTTP headers:
109+
110+ - ` Accept-Encoding `
111+ - ` Host `
112+ - ` User-Agent `
113+
114+ Use the ** Headers** parameter to add other headers or override the default values.
115+
108116## EXAMPLES
109117
110118### Example 1: Send a web request
Original file line number Diff line number Diff line change 22external help file : Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33Locale : en-US
44Module Name : Microsoft.PowerShell.Utility
5- ms.date : 12/10/2025
5+ ms.date : 01/20/2026
66online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-7.5&WT.mc_id=ps-gethelp
77schema : 2.0.0
88aliases :
@@ -116,6 +116,14 @@ variables. See the [NOTES](#notes) section of this article.
116116Beginning in PowerShell 7.4, character encoding for requests defaults to UTF-8 instead of ASCII. If
117117you need a different encoding, you must set the ` charset ` attribute in the ` Content-Type ` header.
118118
119+ By default, the HTTP request includes default values for the following HTTP headers:
120+
121+ - ` Accept-Encoding `
122+ - ` Host `
123+ - ` User-Agent `
124+
125+ Use the ** Headers** parameter to add other headers or override the default values.
126+
119127## EXAMPLES
120128
121129### Example 1: Get the PowerShell RSS feed
Original file line number Diff line number Diff line change 22external help file : Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33Locale : en-US
44Module Name : Microsoft.PowerShell.Utility
5- ms.date : 12/10/2025
5+ ms.date : 01/20/2026
66online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-7.5&WT.mc_id=ps-gethelp
77schema : 2.0.0
88aliases :
@@ -105,6 +105,14 @@ variables. See the [Notes](#notes) section of this article.
105105Beginning in PowerShell 7.4, character encoding for requests defaults to UTF-8 instead of ASCII. If
106106you need a different encoding, you must set the ` charset ` attribute in the ` Content-Type ` header.
107107
108+ By default, the HTTP request includes default values for the following HTTP headers:
109+
110+ - ` Accept-Encoding `
111+ - ` Host `
112+ - ` User-Agent `
113+
114+ Use the ** Headers** parameter to add other headers or override the default values.
115+
108116## EXAMPLES
109117
110118### Example 1: Send a web request
Original file line number Diff line number Diff line change 22external help file : Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33Locale : en-US
44Module Name : Microsoft.PowerShell.Utility
5- ms.date : 12/10/2025
5+ ms.date : 01/20/2026
66online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-7.6&WT.mc_id=ps-gethelp
77schema : 2.0.0
88aliases :
@@ -116,6 +116,14 @@ variables. See the [NOTES](#notes) section of this article.
116116Beginning in PowerShell 7.4, character encoding for requests defaults to UTF-8 instead of ASCII. If
117117you need a different encoding, you must set the ` charset ` attribute in the ` Content-Type ` header.
118118
119+ By default, the HTTP request includes default values for the following HTTP headers:
120+
121+ - ` Accept-Encoding `
122+ - ` Host `
123+ - ` User-Agent `
124+
125+ Use the ** Headers** parameter to add other headers or override the default values.
126+
119127## EXAMPLES
120128
121129### Example 1: Get the PowerShell RSS feed
Original file line number Diff line number Diff line change 22external help file : Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33Locale : en-US
44Module Name : Microsoft.PowerShell.Utility
5- ms.date : 12/10/2025
5+ ms.date : 01/20/2026
66online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-7.6&WT.mc_id=ps-gethelp
77schema : 2.0.0
88aliases :
@@ -105,6 +105,14 @@ variables. See the [Notes](#notes) section of this article.
105105Beginning in PowerShell 7.4, character encoding for requests defaults to UTF-8 instead of ASCII. If
106106you need a different encoding, you must set the ` charset ` attribute in the ` Content-Type ` header.
107107
108+ By default, the HTTP request includes default values for the following HTTP headers:
109+
110+ - ` Accept-Encoding `
111+ - ` Host `
112+ - ` User-Agent `
113+
114+ Use the ** Headers** parameter to add other headers or override the default values.
115+
108116## EXAMPLES
109117
110118### Example 1: Send a web request
You can’t perform that action at this time.
0 commit comments