From eadda6107cb2398d8bea8ed526cf96f16df4fee4 Mon Sep 17 00:00:00 2001 From: Kawawete Date: Thu, 17 Oct 2024 11:02:49 +0200 Subject: [PATCH] Mod --- Misc/Multi-Thread/template.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Misc/Multi-Thread/template.ps1 b/Misc/Multi-Thread/template.ps1 index 0cf1184..fd2c007 100644 --- a/Misc/Multi-Thread/template.ps1 +++ b/Misc/Multi-Thread/template.ps1 @@ -1,2 +1,7 @@ # This is a template for multi-threaded stuff, or at least it should be... +# We start a new job and store it in a variable to be able to display said job later by invoking the variable in the Receive-Job cmdlet. +$Job = Start-Job -ScriptBlock {Write-Output 'Hello World'} +Receive-Job $Job # Will display Hello World in the cmd + +