Foreword xiii
Introduction xxxiii
Chapter 1 Setting Up a PowerShell 7 Environment 1
What is New in PowerShell 7 2
Systems Used in This Book and Chapter 3
Installing PowerShell 7 5
Installing and Configuring VS Code 14
Using the PowerShell Gallery 21
Creating a Local PowerShellGet Repository 24
Creating a Code-Signing Environment 30
Summary 35
Chapter 2 PowerShell 7 Compatibility with Windows PowerShell 37
Examining PowerShell Modules 38
Introducing the Compatibility Solution 48
Things That Do Not Work with PowerShell 7 51
Summary 54
Chapter 3 Managing Active Directory 55
Systems Used in This Chapter 58
Establishing a Forest Root Domain 60
Installing a Replica DC 66
Installing a Child Domain 70
Configuring a Cross-Forest Trust 75
Managing AD Users, Computers, and OUs 86
Adding Users to AD via a CSV 96
Configuring Just Enough Administration (JEA) 100
Summary 109
Chapter 4 Managing Networking 111
Systems Used in This Chapter 112
Configuring IP Addressing 113
Testing Network Connectivity 117
Installing the DHCP Service 121
Configuring DHCP Scopes 124
Configuring DHCP Failover 128
Configuring the DNS Service 133
Configuring DNS Zones and Resource Records 138
Summary 144
Chapter 5 Managing Storage 145
Systems Used in This Chapter 146
Managing Disks and Volumes 147
Managing NTFS Permissions 154
Managing Storage Replica 163
Managing Filestore Quotas 175
Managing File Screening 183
Summary 190
Chapter 6 Managing Shared Data 191
Systems Used in This Chapter 193
Setting Up and Securing an SMB File Server 194
Creating and Securing SMB Shares 198
Creating and Using an iSCSI Target 207
Setting Up a Clustered Scale-Out File Server 218
Summary 229
Chapter 7 Managing Printing 231
Systems Used in This Chapter 232
Installing and Sharing Printers 233
Publishing a Printer in AD 238
Changing the Spool Folder 240
Printing a Test Page 245
Creating a Printer Pool 248
Summary 249
Chapter 8 Managing Hyper-V 251
Systems Used in This Chapter 253
Installing and Configuring Hyper-V 254
Creating a Hyper-V VM 257
Using PowerShell Direct 262
Configuring VM Networking 265
Configuring VM Hardware 271
Implementing Nested Virtualization 277
Using VM Checkpoints 282
Using VM Replication 291
Managing VM Movement 305
Measuring VM Resource Usage 311
Summary 314
Chapter 9 Using WMI with CIM Cmdlets 315
Exploring WMI Namespaces 320
Exploring WMI Classes 328
Getting Local and Remote Objects 330
Invoking WMI Methods 334
Managing WMI Events 339
Implementing Permanent WMI Event Handling 347
Summary 355
Chapter 10 Reporting 357
Systems Used in This Chapter 358
Reporting on AD Users and Computers 359
Managing Filesystem Reporting 365
Collecting Performance Information Using PLA 374
Reporting on PLA Performance Data 379
Creating a Performance Monitoring Graph 382
Creating a System Diagnostics Report 385
Reporting on Printer Usage 387
Creating a Hyper-V Status Report 390
Reviewing Event Logs 395
Summary 402
Index 403