diff --git a/reference/3.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md b/reference/3.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md index 7eb519f1970a..88ca30768208 100644 --- a/reference/3.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md +++ b/reference/3.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md @@ -34,6 +34,11 @@ For JavaScript Object Notation (JSON) or XML, Windows PowerShell converts (or de This cmdlet is introduced in Windows PowerShell 3.0. +> [!NOTE] +> By default, +> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property. +> Use the `-UseBasicParsing` switch to suppress this. + ## Examples ### Example 1: Get the PowerShell RSS feed diff --git a/reference/3.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md b/reference/3.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md index ca571b955755..4d68ce15c902 100644 --- a/reference/3.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md +++ b/reference/3.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md @@ -31,6 +31,12 @@ It parses the response and returns collections of forms, links, images, and othe This cmdlet was introduced in Windows PowerShell 3.0. +> [!NOTE] +> By default, +> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property. +> Use the `-UseBasicParsing` switch to suppress this. + + ## EXAMPLES ### Example 1 diff --git a/reference/4.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md b/reference/4.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md index 1ccb18268f81..c58ed0c25fcb 100644 --- a/reference/4.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md +++ b/reference/4.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md @@ -33,6 +33,11 @@ For JavaScript Object Notation (JSON) or XML, Windows PowerShell converts (or de This cmdlet is introduced in Windows PowerShell 3.0. +> [!NOTE] +> By default, +> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property. +> Use the `-UseBasicParsing` switch to suppress this. + ## Examples ### Example 1: Get the PowerShell RSS feed diff --git a/reference/4.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md b/reference/4.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md index e31ce8bbfb3a..754889b9939c 100644 --- a/reference/4.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md +++ b/reference/4.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md @@ -30,6 +30,11 @@ It parses the response and returns collections of forms, links, images, and othe This cmdlet was introduced in Windows PowerShell 3.0. +> [!NOTE] +> By default, +> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property. +> Use the `-UseBasicParsing` switch to suppress this. + ## EXAMPLES ### Example 1 diff --git a/reference/5.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md b/reference/5.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md index 4c9a5301ebe6..aff439d34f53 100644 --- a/reference/5.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md +++ b/reference/5.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md @@ -34,6 +34,11 @@ For JavaScript Object Notation (JSON) or XML, Windows PowerShell converts (or de This cmdlet is introduced in Windows PowerShell 3.0. +> [!NOTE] +> By default, +> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property. +> Use the `-UseBasicParsing` switch to suppress this. + ## Examples ### Example 1: Get the PowerShell RSS feed @@ -104,11 +109,11 @@ Invoke-RestMethod -Method Post -Uri $url -Credential $Cred -Body $body -OutFile ### Example 3: Pass multiple headers ```powershell -$headers = @{ +$headers = @{ 'userId' = 'UserIDValue' 'token' = 'TokenValue' } -Invoke-RestMethod -Uri $uri -Method Post -Headers $headers -Body $body +Invoke-RestMethod -Uri $uri -Method Post -Headers $headers -Body $body ``` APIs often require passed headers for authentication, validation etc. diff --git a/reference/5.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md b/reference/5.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md index 3eee667c6d8c..59e5e91eb6c6 100644 --- a/reference/5.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md +++ b/reference/5.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md @@ -30,6 +30,11 @@ It parses the response and returns collections of forms, links, images, and othe This cmdlet was introduced in Windows PowerShell 3.0. +> [!NOTE] +> By default, +> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property. +> Use the `-UseBasicParsing` switch to suppress this. + ## EXAMPLES ### Example 1: Send a web request diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md b/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md index 1d1d6c58fe83..5e2864631d94 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md @@ -35,6 +35,11 @@ For JavaScript Object Notation (JSON) or XML, Windows PowerShell converts (or de This cmdlet is introduced in Windows PowerShell 3.0. +> [!NOTE] +> By default, +> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property. +> Use the `-UseBasicParsing` switch to suppress this. + ## EXAMPLES ### Example 1: Get the PowerShell RSS feed diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Invoke-WebRequest.md b/reference/5.1/Microsoft.PowerShell.Utility/Invoke-WebRequest.md index 3621356b477d..499eb154df29 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Invoke-WebRequest.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Invoke-WebRequest.md @@ -26,11 +26,17 @@ Invoke-WebRequest [-UseBasicParsing] [-Uri] [-WebSession [!NOTE] +> By default, +> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property. +> Use the `-UseBasicParsing` switch to suppress this. + ## EXAMPLES ### Example 1: Send a web request