What this book covers
Chapter 1, Installing and Configuring PowerShell 7, shows you how you can install and configure both PowerShell 7 and VS Code, which replaces the Windows PowerShell Integrated Scripting Environment (ISE) as well as installing a new font, Cascadia Code. This chapter also examines the PowerShell 7 environment, including examining the PSReadLine
module.
Chapter 2, Managing PowerShell 7 in the Enterprise, looks at how you can use various PowerShell 7 features that might be more common within larger enterprises. These include the Remote Server Administration Tools (RSAT), package management and the PowerShell Gallery, and creating a local module repository. The chapter also looks at PowerShell script signing, using short cuts, and working with archive (.zip
) files.
Chapter 3, Exploring .NET, examines .NET, which provides the foundation for PowerShell 7. The chapter looks at .NET assemblies, classes, and methods. The chapter concludes with showing you how to create simple C#-based PowerShell extensions, as well as a full PowerShell cmdlet.
Chapter 4, Managing Active Directory, examines how to install, manage, and leverage Active Directory, including installing domains and child domains, managing AD objects, and leveraging Group Policy. This chapter also shows how you can use a CSV to create multiple AD user accounts.
Chapter 5, Managing Networking, shows you how to manage Windows networking with PowerShell. Networks are today central to almost every organization and this chapter looks at a variety of network-related tasks, including looking at new ways (with PowerShell) to do old things, such as setting up DNS, DHCP, and DHCP failover and load balancing.
Chapter 6, Implementing Enterprise Security, looks at security aspects within the context of an enterprise environment. The chapter looks at Just Enough Administration (JEA), which limits the actions an administrator can perform remotely). The chapter also looks at the event log, and PowerShell 7’s script block logging, setting PowerShell 7 related Group policies and configuring a fine-grained AD password policy. The chapter concludes by looking at the Windows Defender AV product built into Windows Server.
Chapter 7, Managing Storage, looks at managing storage in Windows Server, including locally attached devices and Windows Storage Spaces. The chapter also looks at managing Storage Replica, a feature of Windows Server 2022.
Chapter 8, Managing Shared Data, examines different ways to share data and manage your shared data with Windows Server and PowerShell, including managing NTFS permissions, creating and securing SMB shares, and setting up and using iSCSI. The chapter concludes by looking at File Server Resource Manager (FSRM), a feature of Windows Server, and managing FSRM quotas, file screening, and reporting.
Chapter 9, Managing Printing, shows you how to manage printers, printer queues, and printer drivers as well as how to set up a printer pool. You will also examine how to print a test page.
Chapter 10, Exploring Windows Containers, shows you how to install the Containers feature in Windows Server 2022, and use sample containers you can download. You can use containers to create a website and create a custom container using a Docker file.
Chapter 11, Managing Hyper-V, demonstrates the use of Hyper-V. This chapter shows you how to build and deploy VMs with Hyper-V. This includes nested Hyper-V running a Hyper-V VM inside another Hyper-V VM, which is useful in many scenarios.
Chapter 12, Debugging and Troubleshooting Windows Server, looks at a number of aspects of both reactive and proactive troubleshooting. This includes using the PowerShell script debugger, getting events from the event log, and using the Best Practice Analyzer contained in Windows Server.
Chapter 13, Managing Window Server with Window Management Instrumentation (WMI), examines WMI and enables you to investigate WMI namespaces, classes, and class occurrences. You retrieve information from WMI classes, update WMI using WMI methods, and manage WMI events, including WMI permanent eventing.
Chapter 14, Managing Windows Update Services, examines how you can install, configure, and manage the Windows Server Update Service (WSUS). This chapter shows how to manage a Windows feature that has no PowerShell 7 commands and does not work natively in PowerShell 7.