-->
Navigation
Windows Server 2016 Automation With PowerShell Cookbook, Second Edition

Windows Server 2016 Automation With PowerShell Cookbook, Second Edition

Now pay Easier and Secure using Paypal
Price:

Read more

Automate manual administrative tasks with ease

Thomas Lee


e-books shop
e-books shop
Purchase Now !
Just with Paypal



Book Details
 Price
 3.00
 Pages
 651 p
 File Size 
 31,058 KB
 File Type
 PDF format
 ISBN
 978-1-78712-204-8
 Copyright©   
 2017 Packt Publishing  

About the Author
Thomas Lee is a consultant/trainer/writer from England and has been in the IT business
since the late 1960's. After graduating from Carnegie Mellon University, Thomas joined
ComShare where he was a systems programmer building the Commander II time-sharing
operating system, a forerunner of today's Cloud computing paradigm. He moved to
Comshare UK in 1975 and later went to work for ICL, again developing operating systems.
After a sabbatical in 1980/81, he joined Arthur Andersen Management Consultants (now
known as Accenture). He left in 1988 to run his own consulting and training business,
which is still active today.
Thomas holds numerous Microsoft certifications, including MCSE (one of the first in the
world) and later versions, MCT (22 years), and was awarded Microsoft's MVP award 17
times. He is also a Fellow of the British Computer Society. He has written extensively for
the UK trade press, including PC Pro.
Today, Thomas writes and talks mainly on PowerShell and Azure. He currently works for a
number of clients to deliver training and to build training courses. Having traveled the
world, he entered semi-retirement in 2016 and is spending more time at his cottage in the
English countryside, along with his wife, Susan, and their daughter, Rebecca. He continues
to give back to the community and spends a lot of time as group administrator for the
PowerShell forum on Spiceworks, where he is also a Moderator.

About the Reviewer
Mike F. Robbins is a Microsoft MVP on Windows PowerShell and a SAPIEN Technologies
MVP. He is a co-author of Windows PowerShell TFM 4th Edition and is a contributing author
of a chapter in the PowerShell Deep Dives book. Mike has written guest blog articles for the
Hey, Scripting Guy! blog, PowerShell Magazine, and PowerShell.org. He is the winner of
the advanced category in the 2013 PowerShell Scripting Games. Mike is also the leader and
co-founder of the Mississippi PowerShell User Group. He blogs at mikefrobbins.com and
can be found on Twitter at @mikefrobbins.

Preface
PowerShell was first introduced to the world at the Professional Developer's conference in
Los Angles in 2003 by Jeffrey Snover. Code named Monad, it represented a complete
revolution in management. A white paper written around that time, The Monad Manifesto
amazing analysis of the problem at the time of managing large number of Windows
systems. A key takeaway—the GUI does not scale, whereas PowerShell does.

PowerShell has transformed managing of complex, network-based Windows infrastructure
and increasingly non-Windows infrastructure. Knowledge of PowerShell and how to get
the most from PowerShell is now obligatory for any IT Pro job—the adage being Learn
PowerShell or learn Golf.

This book takes you through the use of PowerShell in a variety of scenarios using many of
the rich set of features included in Windows Server 2016. This preface provides you with an
introduction to what is in the book and some tips on how to get the most out of the content.

Table of Contents
Preface 1
Chapter 1: What's New in PowerShell and Windows Server 11
Introduction 11
Exploring Remote Server Administration Tools (RSAT) 12
How to do it... 12
How it works... 14
There's more... 18
Discovering new cmdlets in PowerShell 4 and Windows Server 2012 R2 18
New cmdlets 19
How to do it... 19
How it works... 20
There's more... 22
Discovering new cmdlets in PowerShell 5/5.1 and Windows Server 2016 22
Getting ready 23
PowerShellGet module 23
PackageManagement module 23
Microsoft.PowerShell.Archive module 23
Microsoft.PowerShell.Utility module 23
Other new modules 24
Other new cmdlets 25
How to do it... 25
How it works... 28
There's more... 32
Exploring PowerShellGet 32
How to do it... 32
How it works... 36
There's more... 43
Exploring PackageManagement 43
How to do it... 44
How it works... 47
There's more... 51
Creating an internal PowerShell repository 51
How to do it... 52
How it works... 56
There's more... 57
Chapter 2: Implementing Nano Server 58
Introduction 58
Deploying a Nano Server in a VM 58
Getting ready 59
How to do it... 59
How it works... 61
There's more... 64
Connecting to and managing a Nano Server 64
Getting ready 65
How to do it... 65
How it works... 68
There's more... 79
Installing features with Nano Server packages 80
Getting ready 80
How to do it... 81
How it works... 83
There's more... 88
Chapter 3: Managing Windows Updates 91
Introduction 91
Installing Windows Server Update Services 92
Getting ready 92
How to do it... 92
How it works... 94
There's more... 99
Configuring WSUS update synchronization 100
Getting ready 100
How to do it... 100
How it works... 103
There's more... 106
Configuring the Windows Update client 106
Getting ready 106
How to do it... 106
How it works... 108
There's more... 109
Creating computer target groups 109
Getting ready 110
How to do it... 110
How it works... 110
There's more... 111
Configuring WSUS auto-approvals 112
Getting ready 112
How to do it... 112
How it works... 113
There's more... 114
Managing updates 115
Getting ready 115
How to do it... 115
How it works... 117
There's more... 120
Chapter 4: Managing Printers 121
Introduction 121
Installing and sharing printers 122
Getting ready 122
How to do it... 122
How it works... 123
Publishing a printer 125
Getting ready 125
How to do it... 125
How it works... 126
There's more... 126
Changing the spool directory 128
Getting ready 128
How to do it... 128
How it works... 130
Changing printer drivers 131
Getting ready 131
How to do it... 132
How it works... 132
Printing a test page on a printer 133
Getting ready 133
How to do it... 133
How it works... 134
Reporting on printer security 135
Getting ready 135
How to do it... 135
How it works... 137
Modifying printer security 137
Getting ready 138
How to do it... 138
How it works... 139
Deploying shared printers 139
Getting ready 140
How to do it... 145
How it works... 147
There's more... 147
Enabling Branch Office Direct Printing 147
Getting ready 148
How to do it... 148
How it works... 149
There's more... 150
Creating a printer pool 150
Getting ready 150
How to do it... 150
How it works... 151
Reporting on printer usage 152
Getting ready 153
How to do it... 153
How it works... 154
There's more... 155
Chapter 5: Managing Server Backup 156
Introduction 156
Configure and set backup policy 158
Getting ready 158
How to do it... 159
How it works... 160
There's more... 164
Examine the results of a backup 164
Getting ready 165
How to do it... 165
How it works... 166
There's more... 169
Initiate a backup manually 169
Getting ready 169
How to do it... 170
How it works... 171
There's more... 173
Restore files and folders 173
Getting ready 174
How to do it... 175
How it works... 176
There's more... 178
Backup and restore a Hyper-V Virtual Machine 178
Getting ready 178
How to do it... 178
How it works... 180
There's more... 185
Backup and perform bare metal recovery 186
Getting ready 186
How to do it... 186
How it works... 189
There's more... 202
Restore the registry from a backup 202
Getting ready 202
How to do it... 203
How it works... 207
There's more... 209
Create a daily backup report 210
Getting ready 210
How to do it... 210
How it works... 213
There's more... 214
Backup and restore using Microsoft Azure 215
Getting ready 215
How to do it... 215
How it works... 219
There's more... 226
Chapter 6: Managing Performance 227
Introduction 227
Explore performance counters with Get-Counter 229
Getting ready 229
How to do it... 230
How it works... 231
There's more... 235
Explore performance counters using CIM cmdlets 236
Getting ready 237
How to do it... 237
How it works... 238
There's more... 241
Configuring and using Data Collector Sets 242
Getting ready 242
How to do it... 243
How it works... 244
There's more... 246
Reporting on performance data 247
Getting ready 247
How to do it... 247
How it works... 248
There's more... 249
Generating performance monitoring graph 250
Getting ready 250
How to do it... 250
How it works... 251
There's more... 253
Creating a system diagnostics report 253
Getting ready 253
How to do it... 253
How it works... 254
There's more... 255
Chapter 7: Troubleshooting Windows Server 2016 256
Introduction 256
Checking network connectivity 257
Getting ready 258
How to do it... 258
How it works... 259
There's more... 262
Using troubleshooting packs 263
Getting ready 263
How to do it... 263
How it works... 264
There's more... 267
Use best practice analyzer 267
Getting ready 268
How to do it... 268
How it works... 270
There's more... 273
Managing event logs 274
Getting ready 274
How to do it... 275
How it works... 276
There's more... 280
Forward event logs to a central server 280
Getting ready 281
How to do it... 281
How it works... 284
There's more... 287
Chapter 8: Managing Windows Networking Services 288
Introduction 289
New ways to do old things 291
Getting ready 291
How to do it... 292
How it works... 293
There's more... 297
Configuring IP addressing 298
Getting ready 299
How to do it... 299
How it works... 300
There's more... 302
Converting IP address from static to DHCP 302
Getting ready 302
How to do it... 303
How it works... 303
There's more... 304
Installing domain controllers and DNS 304
Getting ready 305
How to do it... 305
How it works... 306
There's more... 309
Configuring zones and resource records in DNS 310
Getting ready 310
How to do it... 311
How it works... 312
There's more... 314
Installing and authorizing a DHCP server 315
Getting ready 315
How to do it... 316
How it works... 316
There's more... 317
Configuring DHCP scopes 318
Getting ready 318
How to do it... 318
How it works... 319
There's more... 320
Configuring DHCP server failover and load balancing 320
Getting ready 321
How to do it... 321
How it works... 322
There's more... 323
Building a public key infrastructure 323
Getting ready 323
How to do it... 324
How it works... 329
There's more... 337
Creating and managing AD users, groups, and computers 338
Getting ready 339
How to do it... 339
How it works... 341
There's more... 344
Adding users to AD using a CSV file 345
Getting ready 345
How to do it... 345
How it works... 346
There's more... 346
Reporting on AD users 347
Getting ready 347
How to do it... 347
How it works... 349
There's more... 350
Finding expired computers in AD 350
Getting ready 350
How to do it... 350
How it works... 351
There's more... 351
Creating a privileged user report 352
Getting ready 352
How to do it... 352
How it works... 354
There's more... 356
Chapter 9: Managing Network Shares 357
Introduction 357
Securing your SMB file server 359
Getting ready 359
How to do it... 359
How it works... 360
There's more... 361
Creating and securing SMB shares 362
Getting ready 362
How to do it... 362
How it works... 364
There's more... 365
Accessing SMB shares 365
Getting ready 366
How to do it... 366
How it works... 367
There's more... 370
Creating an iSCSI target 370
Getting ready 371
How to do it... 371
How it works... 372
There's more... 373
Using an iSCSI target 374
Getting ready 374
How to do it... 374
How it works... 375
There's more... 377
Creating a scale-out SMB file server 378
Getting ready 378
How to do it... 378
How it works... 380
There's more... 383
Configuring a DFS Namespace 383
Getting ready 385
How to do it... 385
How it works... 389
There's more... 393
Configuring DFS Replication 394
Getting Ready 395
How to do it... 395
How it works... 400
There's more... 405
Chapter 10: Managing Internet Information Server 406
Introduction 406
Installing IIS 407
Getting ready 407
How to do it... 407
How it works... 408
There's more... 412
Configuring IIS for SSL 413
Getting ready 414
How to do it... 414
How it works... 415
There's more... 416
Managing TLS cipher suites 417
Getting ready 417
How to do it... 417
How it works... 418
There's more... 419
Configuring a central certificate store 420
Getting ready 420
How to do it... 420
How it works... 423
Configuring IIS bindings 424
Getting ready 425
How to do it... 425
How it works... 426
There's more ... 427
Configuring IIS logging and log files 427
Getting ready 428
How to do it... 428
How it works... 429
There's more... 431
Managing applications and application pools 431
Getting ready 433
How to do it... 433
How it works... 434
There's more... 436
Managing and monitoring network load balancing 436
Getting ready 437
How to do it... 437
How it works... 439
There's more... 442
Chapter 11: Managing Hyper-V 443
Introduction 443
Installing and configuring Hyper-V feature 444
Getting ready 444
How to do it... 445
How it works... 446
There's more... 448
Using Windows PowerShell Direct 450
Getting ready 450
How to do it... 450
How it works... 451
There's more... 452
Securing Hyper-V host 453
Getting ready 453
How to do it... 453
How it works... 455
There's more... 456
Create a virtual machine 457
Getting ready 457
How to do it... 457
How it works... 458
There's more... 461
Configuring VM hardware 461
Getting ready 462
How to do it... 462
How it works... 463
There's more... 465
Configuring Hyper-V networking 466
Getting ready 466
How to do it... 466
How it works... 468
There's more... 470
Implementing nested Hyper-V 471
Getting ready 472
How to do it... 472
How it works... 473
There's more... 475
Managing VM state 475
Getting ready 475
How to do it... 476
How it works... 477
There's more... 479
Configuring VM and storage movement 479
Getting ready 480
How to do it... 480
How it works... 482
There's more... 484
Configuring VM replication 484
Getting ready 485
How to do it... 485
How it works... 487
There's more... 490
Managing VM checkpoints 492
Getting ready 493
How to do it... 493
How it works... 495
There's more... 499
Monitoring Hyper-V utilization and performance 500
Getting ready 500
How to do it... 501
How it works... 502
There's more... 504
Creating a Hyper-V health report 504
Getting ready 505
How to do it... 505
How it works... 507
There's more... 509
Chapter 12: Managing Azure 510
Introduction 510
Using PowerShell with Azure 512
Getting ready 515
How to do it... 515
How it works... 517
There's more... 522
Creating Core Azure Resources 523
Getting Ready 523
How to do it... 524
How it works... 524
There's more... 526
Exploring your storage account 526
Getting ready 529
How to do it... 529
How it works... 531
There's more... 533
Creating Azure an SMB File Share 534
Getting ready 535
How to do it... 535
How it works... 537
There's more... 539
Creating and using websites 540
Getting ready 540
How to do it... 541
How it works... 543
There's more... 547
Creating and using Azure virtual machines 547
Getting ready 549
How to do it... 549
How it works... 553
There's more... 558
Chapter 13: Using Desired State Configuration 560
Introduction 560
Using DSC and built-in resources 563
Getting ready 563
How to do it... 564
How it works... 565
There's more... 570
Parameterizing DSC configuration 571
Getting ready 572
How to do it... 572
How it works... 574
There's more... 576
Finding and installing DSC resources 576
Getting ready 577
How to do it... 577
How it works... 578
There's more... 581
Using DSC with PSGallery resources 581
Getting ready 582
How to do it... 584
How it works... 585
There's more... 587
Configuring Local Configuration Manager 588
Getting ready 588
How to do it... 589
How it works... 590
There's more... 592
Implementing a SMB pull server 592
Getting ready 593
How to do it... 593
How it works... 595
There's more... 597
Implementing a DSC web-based pull server 597
Getting ready 597
How to do it... 598
How it works... 601
There's more... 607
Using DSC partial configurations 607
Getting ready 608
How to do it... 608
How it works... 614
There's more... 621
Index 622


Bookscreen
e-books shop

What you need for this book
To get the most out of this book, you need to experiment with the code contained in the
recipes. To avoid errors impacting live production servers, you should instead use
virtualization to create a test lab, where mistakes do not cause any serious damage. This
book uses a variety of servers within a single Reskit.Org domain containing multiple
servers, and using an IP address block of 10.10.10/24 described in Getting the most from this book.

Ideally, you should have a Windows 10 or Windows Server 2016 host with virtualization
capabilities and use a virtualization solution. If you have access to a cloud computing
platform, then you could perform most of the recipies in cloud-hosted virtual machines
although that has not been tested. You can use any virtualization.
The book was developed using Hyper-V and nested Hyper-V on Windows 10 Creator's
Update and Windows Server 2016. More details of the servers are contained in the preface
and each recipe.

Who this book is for
This book is aimed at IT Pros, including system administrators, system engineers, as well as
architects and consultants who need to leverage PowerShell to simplify and automate their daily tasks.

0