From 38c480bab5b0dbd1888e5fbee67bad37b5d6366d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Tue, 19 Oct 2021 16:33:37 +0300 Subject: [PATCH] Update PowerShell example --- templates/docs/powershell.html | 2 +- templates/docs/powershell.md | 2 +- templates/front/show_usage_modal.html | 1 + templates/front/snippets/powershell_inline.html | 2 +- templates/front/snippets/powershell_inline.txt | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/docs/powershell.html b/templates/docs/powershell.html index 09b20f28..2b107690 100644 --- a/templates/docs/powershell.html +++ b/templates/docs/powershell.html @@ -17,5 +17,5 @@ Then use the following command in a Scheduled Task to run the script:

In simple cases, you can also pass the script to PowerShell directly, using the "-command" argument:

# Without an underlying script, passing the command to PowerShell directly:
-powershell.exe -command &{Invoke-RestMethod PING_URL}
+powershell.exe -Command "&{Invoke-RestMethod PING_URL}"
 
\ No newline at end of file diff --git a/templates/docs/powershell.md b/templates/docs/powershell.md index c8d740b1..fbf9b885 100644 --- a/templates/docs/powershell.md +++ b/templates/docs/powershell.md @@ -25,5 +25,5 @@ using the "-command" argument: ```bat # Without an underlying script, passing the command to PowerShell directly: -powershell.exe -command &{Invoke-RestMethod PING_URL} +powershell.exe -Command "&{Invoke-RestMethod PING_URL}" ``` diff --git a/templates/front/show_usage_modal.html b/templates/front/show_usage_modal.html index e319a942..89d58325 100644 --- a/templates/front/show_usage_modal.html +++ b/templates/front/show_usage_modal.html @@ -89,6 +89,7 @@
{% include "front/snippets/powershell.html" %} + {% include "front/snippets/powershell_inline.html" %}

diff --git a/templates/front/snippets/powershell_inline.html b/templates/front/snippets/powershell_inline.html index 1ecb51b5..9cca4370 100644 --- a/templates/front/snippets/powershell_inline.html +++ b/templates/front/snippets/powershell_inline.html @@ -1,3 +1,3 @@

# Without an underlying script, passing the command to PowerShell directly:
-powershell.exe -command &{Invoke-RestMethod {{ ping_url }}}
+powershell.exe -Command "&{Invoke-RestMethod {{ ping_url }}}"
 
diff --git a/templates/front/snippets/powershell_inline.txt b/templates/front/snippets/powershell_inline.txt index f5ee44c7..5cc98172 100644 --- a/templates/front/snippets/powershell_inline.txt +++ b/templates/front/snippets/powershell_inline.txt @@ -1,2 +1,2 @@ # Without an underlying script, passing the command to PowerShell directly: -powershell.exe -command &{Invoke-RestMethod PING_URL} \ No newline at end of file +powershell.exe -Command "&{Invoke-RestMethod PING_URL}" \ No newline at end of file