Chapter 3

Working with Scripts and Cmdlets

IN THIS CHAPTER

check Examining common scripts and cmdlets

check Running PowerShell scripts or cmdlets

check Working remotely with PowerShell

check Performing administrative tasks with PowerShell scripts

In Chapter 1, I explain what PowerShell is and fill you in on the basics of working with it. In Chapter 2, I tell you a little bit about .NET and its interaction with PowerShell. This chapter is all about putting that information and your skills to use by starting to build out the scripts that you’ll use on a daily basis as a system administrator.

Introducing Common Scripts and Cmdlets

Writing single lines of PowerShell is pretty common when you have administrative tasks that you’re trying to perform, but most of the really useful and powerful PowerShell comes from the ability to put multiple cmdlets into a script.

The Microsoft website has some great reference material for PowerShell. What I find the most beneficial is the Reference link off the main PowerShell site (https://docs.microsoft.com/en-us/powershell/scripting/). When you click the Reference link, ...

Get Windows Server 2022 & Powershell All-in-One For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.