1
00:00:00,240 --> 00:00:07,340
So in summary, our goal for this module was to create multiple sessions,

2
00:00:07,340 --> 00:00:11,120
execute commands, and then copy some files.

3
00:00:11,120 --> 00:00:16,740
To achieve this, we created single and multiple sessions to the remote machines.

4
00:00:16,740 --> 00:00:21,270
We then executed commands that would utilize both the script block option,

5
00:00:21,270 --> 00:00:23,730
which is going to pass a single cmdlet,

6
00:00:23,730 --> 00:00:28,900
or a written PowerShell script that does various tasks.

7
00:00:28,900 --> 00:00:33,040
And then we copied files to the remote computers through the

8
00:00:33,040 --> 00:00:37,550
existing remote sessions that we had by utilizing that ToSession

9
00:00:37,550 --> 00:00:39,760
property as part of the invoke‑command.

10
00:00:39,760 --> 00:00:45,280
And we were able to copy files from a network share all the way through

11
00:00:45,280 --> 00:00:49,390
to a member server and store them locally on their C drive without

12
00:00:49,390 --> 00:00:52,340
actually having to use the UNC path shares,

13
00:00:52,340 --> 00:00:54,440
etc.

14
00:00:54,440 --> 00:01:00,590
As you can see, utilizing PowerShell for remoting is often easy and simple,

15
00:01:00,590 --> 00:01:04,370
though the most important thing is to make sure that the security is configured

16
00:01:04,370 --> 00:01:08,620
correctly and that when you are remoting to other machines,

17
00:01:08,620 --> 00:01:12,490
a real key is to manage the sessions effectively,

18
00:01:12,490 --> 00:01:16,200
so ensure that you open sessions and close them as you need to.

19
00:01:16,200 --> 00:01:21,070
But don't underestimate the power of creating multiple PowerShell

20
00:01:21,070 --> 00:01:29,000
sessions and managing your entire infrastructure by utilizing those sessions and utilizing PowerShell.

