Summary
We started this chapter by looking at PowerShell remoting and saw how the feature can make PowerShell a security risk. We looked at how to create, join, and leave sessions and how to run expressions on multiple remote computers at once.
We then moved on to see how we could secure PowerShell against inadvertent mistakes and saw how the execution policy can “…slow down an uninformed user who is unintentionally trying to run an untrusted script.” We also saw some of the other early security features, such as requiring an absolute or relative path for script execution.
We then looked at more modern security features, many of which only apply to Windows, such as Application Control and language modes. Unfortunately, the security features for Linux and macOS are still sadly lacking.
We looked at the different ways of recording what PowerShell is doing, with over the shoulder logging, script block logging, and module logging, and saw how to turn these...