From the course: PowerShell for SQL Server Administration
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
PowerShell threading commandlets - PowerShell Tutorial
From the course: PowerShell for SQL Server Administration
PowerShell threading commandlets
- [Narrator] Let's talk a little more about threading, 'coz threading is fairly complex topic. So we don't have just the Start-Job cmdlet that we hope for. We do have various other cmdlets available to us as well. So we have the Start-Job cmdlet, which we obviously just saw. That kicks off a background task. We also have Stop-Job, so if you destroy the output of the start-job cmdlet into a variable, we can then use it in some of these other cmdlets when we use that same variable. So when you use that variable in Stop-Job, that's going to stop a background task. We can pause a job using Wait-Job and again just passing the output of Start-Job. And that's going to pause the parent thread and wait for all the jobs to be finished. We also have commands like Receive-Job. So it's going to get the results of the background job that was started by the calling thread. So if we had a parent thread and you do need to get output from that cmdlet, you can do that with the Receive-Job. You can get…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Loops in PowerShell6m 21s
-
(Locked)
Storing servers for PowerShell3m 53s
-
(Locked)
Concepts of threading6m 10s
-
(Locked)
PowerShell threading commandlets2m 37s
-
(Locked)
Authentication and threading3m 24s
-
(Locked)
Piping between objects3m 17s
-
(Locked)
Exporting CSV files2m 56s
-
(Locked)
Importing CSV files2m 27s
-
(Locked)
Exporting XML data2m 50s
-
(Locked)
Importing XML data2m 26s
-
(Locked)
-
-