So in summary, our goal for this module was to create multiple sessions,
execute commands, and then copy some files.
To achieve this, we created single and multiple sessions to the remote machines.
We then executed commands that would utilize both the script block option,
which is going to pass a single cmdlet,
or a written PowerShell script that does various tasks.
And then we copied files to the remote computers through the
existing remote sessions that we had by utilizing that ToSession
property as part of the invoke‑command.
And we were able to copy files from a network share all the way through
to a member server and store them locally on their C drive without
actually having to use the UNC path shares,
etc.
As you can see, utilizing PowerShell for remoting is often easy and simple,
though the most important thing is to make sure that the security is configured
correctly and that when you are remoting to other machines,
a real key is to manage the sessions effectively,
so ensure that you open sessions and close them as you need to.
But don't underestimate the power of creating multiple PowerShell
sessions and managing your entire infrastructure by utilizing those sessions and utilizing PowerShell.