1
00:00:00,240 --> 00:00:02,290
Okay, so now we've created those remote

2
00:00:02,290 --> 00:00:04,800
background jobs, how do we remove the

3
00:00:04,800 --> 00:00:07,760
background jobs that we've created? This

4
00:00:07,760 --> 00:00:09,950
is very similar to the way that we remove

5
00:00:09,950 --> 00:00:12,690
jobs that we just create normally that are

6
00:00:12,690 --> 00:00:15,780
not remote. So if we walk through the

7
00:00:15,780 --> 00:00:18,490
process here, we create the new session,

8
00:00:18,490 --> 00:00:20,290
so I'm creating New‑PSSsession on

9
00:00:20,290 --> 00:00:23,640
Computer1 and Computer2, I'm invoking the

10
00:00:23,640 --> 00:00:25,700
command, which basically says go and

11
00:00:25,700 --> 00:00:27,620
create, this is a job, and then you'll see

12
00:00:27,620 --> 00:00:29,970
that I can retrieve the job because I

13
00:00:29,970 --> 00:00:33,070
populated a variable called $job that will

14
00:00:33,070 --> 00:00:36,440
then allow me to retrieve the job and also

15
00:00:36,440 --> 00:00:38,130
to remove the job. Now you notice I'm

16
00:00:38,130 --> 00:00:40,790
using the ‑Force parameter. Now, the

17
00:00:40,790 --> 00:00:42,120
reason we're using the force parameter

18
00:00:42,120 --> 00:00:43,800
here is because I want to force it to be

19
00:00:43,800 --> 00:00:47,320
removed because often you don't

20
00:00:47,320 --> 00:00:49,270
necessarily know the status, and what you

21
00:00:49,270 --> 00:00:51,620
should do in reality is choose Get‑Job

22
00:00:51,620 --> 00:00:54,300
first, look at the status, wait for it to

23
00:00:54,300 --> 00:00:58,440
complete, maybe use the Wait‑Job before

24
00:00:58,440 --> 00:01:00,580
you remove, but if you need to remove it

25
00:01:00,580 --> 00:01:02,440
because it's not working or it hasn't

26
00:01:02,440 --> 00:01:04,410
kicked in, you have to use the ‑force

27
00:01:04,410 --> 00:01:08,000
parameter and that will forcibly delete the job.

