Linked Questions
32 questions linked to/from Can Powershell Run Commands in Parallel?
0
votes
2
answers
2k
views
Powershell: Get-Content from the large file (server list) [duplicate]
I have 100,000 list of servers from the text file (serverlist.txt)
When I run in one shot it will burst my memory and cpu and the time took longer (about 3 days)to complete the scanning for DNSlookup....
29
votes
4
answers
90k
views
Running tasks parallel in powershell
I have a PowerShell script like this:
Foreach ($file in $files) {
[Do something]
[Do something]
[Do something]
}
This way one file is treated after the other. I want to treat 4 files at ...
12
votes
1
answer
31k
views
Where does Start-Job output go?
W:> $job = start-job { Write-Output "hi there"; throw "an error!" } | Wait-Job
W:> $job | select *
State : Failed
HasMoreData : True
StatusMessage :
Location : localhost
Command ...
4
votes
4
answers
5k
views
How to list all running webjobs within an azure subscription using powershell
I have an azure subscription that has upwards of 200 appServices where around about half of them have Continuous, always on webJobs attached, some also have slots which also have webJobs.
Is there a ...
3
votes
3
answers
24k
views
start-job Run command in parallel and output result as they arrive
I am trying to get specific KBXXXXXX existence on a list of servers , but once my script one server it takes time and return result and come back and then move to next one . this script works ...
4
votes
2
answers
4k
views
Download multiple large files asynchronously with Powershell
I have four large OS installation media I need to download. This will take a long time if I wait for each download to finish before moving to the next one.
Before downloading, I want to check if the ...
2
votes
2
answers
6k
views
PostgreSQL how to split a query between multiple CPU
I have a store procedure
DO_STUFF(obj rowFromMyTable)
This take obj and process some data and save the result in an independent table.
So the order i process the objects isn't important.
DO_STUFF(...
2
votes
1
answer
5k
views
Run powershell script from within a powershell script
I have a perl script perl1.pl.
Within the perl script I call a powershell script script1.ps1.
In script.ps1 I call other script like script2.ps1 with local variables as parameters.
I have prepared a ...
1
vote
3
answers
2k
views
Improving Batch File for loop with start subcommand
I've currently got a very simple script which pings 10 IPs:
@ECHO OFF
for /L %%i in (100, 1, 110) DO (
START /W /B cmd /c ping -n 1 192.168.0.%%i | find "time="
)
The output is as expected:
C:\...
1
vote
1
answer
2k
views
Unzipping works on singlethread, but not multithread
I'm trying to unzip a ton of files using PowerShell. I figured this is a great place to parallelize. However, my attempt to parallelize seems to make the unzip have no effect, even though it worked in ...
2
votes
2
answers
4k
views
How to work with multiple azure kubernetes contexts
I have a azure function app in powershell, dedicated to kubernetes functions.
There are multiple functions but on each of them, the first thing we do is something like this.
az login --service-...
0
votes
2
answers
3k
views
How do I run parallel foreach loop?
I'm trying to run some script in Powershell Core (no workflow, no -Parallel option for ForEach).
So I'm trying to split my array in batches and run them at parallel. So I do:
$iterCount = 150000;
$...
0
votes
1
answer
1k
views
Using CreateThread winapi in Powershell script
i want create thread that run script code in powershell using CreateThread WinApi. i use this code but error occured:
function local:Get-ProcAddress {
Param (
[OutputType([IntPtr])]
[...
0
votes
2
answers
2k
views
Powershell multithreading
I have a Powershell script that converts Office documents to PDF. I would like to multithread it, but cannot figure out how based on other examples I have seen. The main script (OfficeToPDF.ps1) scans ...
0
votes
1
answer
2k
views
Run multiple scripts in parallel
I am stuck at the below task:
I have 5 PowerShell scripts that need to be executed in parallel. I want to create a home.ps1 that will call to other test1.ps1, test2.ps1, test3.ps1,test4.ps1 and test5....