Take advantage of everything Microsoft’s new Power Shell 7 has to offer
Power Shell 7 for IT Pros is your guide to using Power Shell 7, the open source, cross-platform version of Windows Power Shell. Windows IT professionals can begin setting up automation in Power Shell 7, which features many improvements over the early version of Power Shell Core and Windows Power Shell. Power Shell 7 users can enjoy the high level of compatibility with the Windows Power Shell modules they rely on today. This book shows IT professionals–especially Windows administrators and developers–how to use Power Shell7 to engage in their most important tasks, such as managing networking, using AD/DNS/DHCP, leveraging Azure, and more.
To make it easy to learn everything Power Shell 7 has to offer, this book includes robust examples, each containing sample code so readers can follow along. Scripts are based on Power Shell 7 running on Windows 10 19H1 or later and Windows Server 2019.
* Learn to navigate the Power Shell 7 administrative environment
* Use Power Shell 7 to automate networking, Active Directory, Windows storage, shared data, and more
* Run Windows Update, IIS, Hyper-V, and WMI and CIM cmdlets within Power Shell 7
* Understand how to handle reporting in the new Power Shell 7 environment
Power Shell 7 for IT Pros provides exclusive coverage of using Power Shell with both cloud-based systems and virtualized environments (Hyper V and Azure). Written by Power Shell veteran Thomas Lee, this is the only book you’ll need to get started with Power Shell 7.
Spis treści
Foreword xiii
Introduction xxxiii
Chapter 1 Setting Up a Power Shell 7 Environment 1
What is New in Power Shell 7 2
Systems Used in This Book and Chapter 3
Installing Power Shell 7 5
Installing and Configuring VS Code 14
Using the Power Shell Gallery 21
Creating a Local Power Shell Get Repository 24
Creating a Code-Signing Environment 30
Summary 35
Chapter 2 Power Shell 7 Compatibility with Windows Power Shell 37
Examining Power Shell Modules 38
Introducing the Compatibility Solution 48
Things That Do Not Work with Power Shell 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 i SCSI 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 Power Shell 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
O autorze
THOMAS LEE is an IT consultant/trainer/writer who holds numerous Microsoft certifications. He has been awarded Microsoft’s MVP award 17 times. He has written numerous books on TCP/IP and Power Shell. Thomas currently helps clients to deliver training and build training courses. He continues to give back to the community as Group Administrator for the Power Shell forum on Spiceworks, where he is also a Site Moderator.