Browsed by
Tag: multithread

Multithreads in Powershell

Multithreads in Powershell

roualin powershell_2 Multithreads in PowershellA heavy Powershell script uses a lot of ram to proceed. There are many ways to avoid that, and also avoid crashes of the server launching that. The easiest way is to use multithreads with job.

Using jobs will open a new thread into your server/remote server to execute a part of the script. Jobs also can be called to work at the same time, reducing the global execution time of the script.

Here below a small script to introduce you using jobs :

Multi-Thread in PowerShell

Multi-Thread in PowerShell

roualin powershell_2 Multi-Thread in PowerShellThis command allow to launch the same script many times at the same time.

In this example, $serverslist contains 4 server names that the cmdlet invoke-command will send in argument to  myscript.ps1, the –asjob parameter will free us of the sequential processing time of each execution of the invoke-command (just see the screenshot below)

How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site