Book Image

Windows Server Automation with PowerShell Cookbook - Fourth Edition

By : Thomas Lee
Book Image

Windows Server Automation with PowerShell Cookbook - Fourth Edition

By: Thomas Lee

Overview of this book

With a foreword from PowerShell creator Jeffrey Snover, this heavily updated edition is designed to help you learn how to use PowerShell 7.1 effectively and manage the core roles, features, and services of Windows Server in an enterprise setting. All scripts are compatible with both Window Server 2022 and 2019. This latest edition equips you with over 100 recipes you'll need in day-to-day work, covering a wide range of fundamental and more advanced use cases. We look at how to install and configure PowerShell 7.1, along with useful new features and optimizations, and how the PowerShell compatibility solution bridges the gap to older versions of PowerShell. Topics include using PowerShell to manage networking and DHCP in Windows Server, objects in Active Directory, Hyper-V, and Azure. Debugging is crucial, so the book shows you how to use some powerful tools to diagnose and resolve issues with Windows Server.
Table of Contents (18 chapters)
16
Other Books You May Enjoy
17
Index

Network troubleshooting

In the upcoming recipe Checking network connectivity using Get-NetView, you use the Get-NetView command to gather a large amount of network-related information to diagnose and resolve network issues. For some issues, this level of detail is fundamental in helping you to resolve network issues. But in some cases, it can be overkill. Often some simpler steps may help you resolve your more common issues or point you toward a solution.

In this recipe, you carry out some basic troubleshooting on a local SRV1, a domain-joined host running Windows Server 2022. A common theory is that any network problem is due to DNS (until you prove otherwise). You start this recipe by getting the host's fully qualified domain name (FQDN) and the IPv4 address of the DNS server, and then you check whether the DNS server is online.

You then use the configured DNS server to determine the names of the DCs in your domain and ensure you can reach each DC over both port 389...