Windows Server Automation with PowerShell Cookbook, 4th Edition
- Length: 674 pages
- Edition: 4
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2021-07-30
- ISBN-10: 1800568452
- ISBN-13: 9781800568457
- Sales Rank: #646102 (See Top 100 Books)
Over 100 PowerShell recipes for working more effectively with Windows Server 2022/2019
Key Features
- Develop a holistic understanding of Windows Server 2022/2019 with PowerShell 7.1
- Learn best practices for PowerShell scripting to automate common tasks and manage AD, enterprise security, WMI, Azure, and .NET 5
- Discover new ways to optimize your PowerShell code by working through easy-to-follow recipes
Book Description
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 2022/2019 in an enterprise setting. Brand new to this edition are recipes exploring the .NET Framework, enterprise server security, and managing Windows Server with Windows Management Instrumentation (WMI).
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.
What you will learn
- Perform key admin tasks on Windows Server 2022/2019
- Keep your organization secure with JEA, group policies, logs, and Windows Defender
- Use the .NET Framework for administrative scripting
- Manage data and storage on Windows, including disks, volumes, and filesystems
- Create and configure Hyper-V VMs, implementing storage replication and checkpoints
- Set up virtual machines, websites, and shared files on Azure
- Report system performance using built-in cmdlets and WMI to obtain single measurements
- Apply the right tools and modules to troubleshoot and debug Windows Server
Who this book is for
This book is for systems administrators, software architects, developers, or engineers working with Windows Server 2022/2019 seeking to automate tasks more effectively with PowerShell 7.1. Basic knowledge of PowerShell is expected.
Table of Contents
- Installing and Configuring PowerShell 7
- Introducing PowerShell 7
- Exploring Compatibility with Windows PowerShell
- Using PowerShell 7 in the Enterprise
- Exploring .NET
- Managing Active Directory
- Managing Networking in the Enterprise
- Implementing Enterprise Security
- Managing Storage
- Managing Shared Data
- Managing Printing
- Managing Hyper-V
- Managing Azure
- Troubleshooting with PowerShell
- Managing with Windows Management Instrumentation
Preface Who this book is for What this book covers To get the most out of this book Get in touch Installing and Configuring PowerShell 7 Introduction Installing PowerShell 7 Getting ready How to do it... How it works... There's more... Using the PowerShell 7 console Getting ready How to do it... How it works... There's more... Exploring PowerShell 7 installation artifacts Getting ready How to do it... How it works... There's more... Building PowerShell 7 profile files Getting ready How to do it... How it works... There's more... Installing VS Code Getting ready How to do it... How it works... There's more... Installing the Cascadia Code font Getting ready How to do it... How it works... There's more... Exploring PSReadLine Getting ready How to do it... How it works... There's more... Introducing PowerShell 7 Introduction Exploring new operators Getting ready How to do it... How it works... There's more... Exploring parallel processing with ForEach-Object Getting ready How to do it... How it works... There's more... Improvements in ForEach and ForEach-Object Getting ready How to do it... How it works… There's more... Improvements in Test-Connection Getting ready How to do it... How it works… There's more... Using Select-String Getting ready How to do it... How it works… There's more... Exploring the error view and Get-Error Getting ready How to do it... How it works... There's more... Exploring experimental features Getting ready How to do it... How it works... There's more... Exploring Compatibility with Windows PowerShell Introduction Module compatibility Incompatible modules Exploring compatibility with Windows PowerShell Getting ready How to do it... How it works... There's more... Using the Windows PowerShell compatibility solution Getting ready How to do it… How it works... There's more... Exploring compatibility solution limitations Getting ready How to do it... How it works... There's more... Exploring the module deny list Getting ready How to do it... How it works... There's more... Importing format XML Getting ready How to do it... How it works... There's more... Leveraging compatibility Getting ready How to do it... How it works... There's more... Using PowerShell 7 in the Enterprise Introduction Installing RSAT tools on Windows Server Getting ready How to do it... How it works... There's more... Exploring package management Getting ready How to do it... How it works... There's more... Exploring PowerShellGet and the PS Gallery Getting ready How to do it... How it works... There's more... Creating a local PowerShell repository Getting ready How to do it... How it works... There's more... Establishing a script signing environment Getting ready How to do it... How it works... There's more... Working with shortcuts and the PSShortcut module Getting ready How to do it... How it works... There's more... Working with archive files Getting ready How to do it... How it works... There's more... Exploring .NET Introduction Exploring .NET assemblies Getting ready How to do it... How it works... There's more... Examining .NET classes Getting ready How to do it... How it works... There's more... Leveraging .NET methods Getting ready How to do it... How it works... There's more... Creating a C# extension Getting ready How to do it... How it works... There's more... Creating a PowerShell cmdlet Getting ready How to do it... How it works... There's more... Managing Active Directory Introduction Systems used in this chapter Installing an AD forest root domain Getting ready How to do it... How it works... There's more... Testing an AD installation Getting ready How to do it... How it works... There's more… Installing a replica domain controller Getting ready How to do it... How it works... There's more... Installing a child domain Getting ready How to do it... How it works... There's more... Creating and managing AD users and groups Getting ready How to do it... How it works... There's more... Managing AD computers Getting ready How to do it... How it works... There's more... Adding users to AD using a CSV file Getting ready How to do it... How it works... There's more... Creating Group Policy objects Getting ready How to do it... How it works... There's more... Reporting on AD replication Getting ready How to do it... How it works... There's more... Reporting on AD computers Getting ready How to do it... How it works... There's more... Reporting on AD users Getting ready How to do it... How it works... There's more... Managing Networking in the Enterprise Introduction Configuring IP addressing Getting ready How to do it... How it works... There's more... Testing network connectivity Getting ready How to do it... How it works... There's more... Installing DHCP Getting ready How to do it... How it works... There's more... Configuring DHCP scopes and options Getting ready How to do it... How it works... There's more... Using DHCP Getting ready How to do it... How it works... There's more... Implementing DHCP failover and load balancing Getting ready How to do it... How it works... There's more... Deploying DNS in the Enterprise Getting ready How to do it... How it works... There's more... Configuring DNS forwarding Getting ready How to do it... How it works... There's more... Managing DNS zones and resource records Getting ready How to do it... How it works... There's more... Implementing Enterprise Security Introduction Implementing Just Enough Administration (JEA) Getting ready How to do it... How it works... There's more... Examining Applications and Services Logs Getting ready How to do it... How it works... There's more... Discovering logon events in the event log Getting ready How to do it... How it works... There's more... Deploying PowerShell group policies Getting ready How to do it... How it works... There's more... Using PowerShell Script Block Logging Getting ready How to do it... How it works... There's more... Configuring AD password policies Getting ready How to do it... How it works... There's more... Managing Windows Defender Antivirus Getting ready How to do it... How it works... There's more... Managing Storage Introduction Managing physical disks and volumes Getting ready How to do it... How it works... There's more... Managing filesystems Getting ready How to do it... How it works... There's more... Exploring providers and the FileSystem provider Getting ready How to do it... How it works... There's more... Managing Storage Replica Getting ready How to do it... How it works... There's more... Deploying Storage Spaces Getting ready How to do it... How it works... There's more... Managing Shared Data Introduction Managing NTFS file and folder permissions Getting ready How to do it... How it works... There's more... Setting up and securing an SMB file server Getting ready How to do it… How it works… There's more... Creating and securing SMB shares Getting ready How to do it... How it works... There's more... Accessing SMB shares Getting ready How to do it... How it works... There's more... Creating an iSCSI target Getting ready How to do it... How it works... There's more... Using an iSCSI target Getting ready How to do it... How it works... There's more... Implementing FSRM quotas Getting ready How to do it... How it works... There's more... Implementing FSRM reporting Getting ready How to do it... How it works... There's more... Implementing FSRM file screening Getting ready How to do it... How it works... There's more... Managing Printing Introduction Installing and sharing printers Getting ready How to do it... How it works... There's more... Publishing a printer Getting ready How to do it... How it works... There's more... Changing the spooler directory Getting ready How to do it... How it works... There's more... Changing printer drivers Getting ready How to do it... How it works... There's more… Printing a test page Getting ready How to do it... How it works... There's more... Managing printer security Getting ready How to do it... How it works... There's more... Creating a printer pool Getting ready How to do it... How it works... There's more... Managing Hyper-V Introduction Installing Hyper-V inside Windows Server Getting ready How to do it... How it works... There's more... See also Creating a Hyper-V VM Getting ready How to do it... How it works... There's more... Using PowerShell Direct Getting ready How to do it... How it works... There's more... Using Hyper-V VM groups Getting ready How to do it... How it works... There's more... Configuring VM hardware Getting ready How to do it... How it works... There's more... Configuring VM networking Getting ready How to do it... How it works... There's more... Implementing nested virtualization Getting ready How to do it... How it works... There's more... Managing VM state Getting ready How to do it... How it works... There's more... Managing VM and storage movement Getting ready How to do it... How it works... There's more... Managing VM replication Getting ready How to do it... How it works... There's more... Managing VM checkpoints Getting ready How to do it... How it works... There's more... Managing Azure Introduction Getting started using Azure with PowerShell Getting ready How to do it... How it works... There's more... Creating Azure resources Getting ready How to do it... How it works... There's more... Exploring the Azure storage account Getting ready How to do it... How it works... There's more... Creating an Azure SMB file share Getting ready How to do it... How it works... There's more... Creating an Azure website Getting ready How to do it... How it works... There's more... Creating an Azure Virtual Machine Getting ready How to do it... How it works... There's more... Troubleshooting with PowerShell Introduction Using PowerShell Script Analyzer Getting ready How to do it... How it works... There's more... Using Best Practices Analyzer Getting ready How to do it... How it works... There's more... Network troubleshooting Getting ready How to do it... How it works... There's more... Checking network connectivity using Get-NetView Getting ready How to do it... How it works... There's more... Exploring PowerShell script debugging Getting ready How to do it... How it works... There's more... Managing with Windows Management Instrumentation Introduction WMI architecture Exploring WMI in Windows Getting ready How to do it... How it works... There's more... Exploring WMI namespaces Getting ready How to do it... How it works... There's more... Exploring WMI classes Getting ready How to do it... How it works... There's more... Obtaining local and remote WMI objects Getting ready How to do it... How it works... There's more... Using WMI methods Getting ready How to do it... How it works... There's more... Managing WMI events Getting ready How to do it... How it works... There's more... Implementing permanent WMI eventing Getting ready How to do it... How it works... There's more... Why subscribe? Other Books You May Enjoy Index
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Windows Server Automation with PowerShell Cookbook, 4th Edition
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.