Windows Server 2012 Automation with PowerShell Cookbook

If you work on a daily basis with Windows Server 2012, this book will make life easier by teaching you the skills to automate server tasks with PowerShell scripts, all delivered in recipe form for rapid implementation.

Windows Server 2012 Automation with PowerShell Cookbook

Cookbook
Ed Goad

If you work on a daily basis with Windows Server 2012, this book will make life easier by teaching you the skills to automate server tasks with PowerShell scripts, all delivered in recipe form for rapid implementation.
$32.99
$54.99
RRP $32.99
RRP $54.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Code Files
+ Collection

Book Details

ISBN 139781849689465
Paperback372 pages

About This Book

  • Extend the capabilities of your Windows environment
  • Improve the process reliability by using well defined PowerShell scripts
  • Full of examples, scripts, and real-world best practices

Who This Book Is For

This book is written to assist the daily tasks for systems administrators, engineers, and architects working with Windows Server 2012.

Table of Contents

Chapter 1: Understanding PowerShell Scripting
Introduction
Managing security on PowerShell scripts
Creating and using functions
Creating and using modules
Creating and using PowerShell profiles
Passing variables to functions
Validating parameters in functions
Piping data to functions
Recording sessions with transcripts
Signing PowerShell scripts
Sending e-mail
Sorting and filtering
Using formatting to export numbers
Using formatting to export data views
Using jobs
Dealing with errors in PowerShell
Tuning PowerShell scripts for performance
Creating and using Cmdlets
Chapter 2: Managing Windows Network Services with PowerShell
Introduction
Configuring static networking
Installing domain controllers
Configuring zones in DNS
Configuring DHCP scopes
Configuring DHCP server failover
Converting DHCP addresses to static
Building out a PKI environment
Creating AD users
Searching for and reporting on AD users
Finding expired computers in AD
Creating and e-mailing a superuser report
Chapter 3: Managing IIS with PowerShell
Introduction
Installing and configuring IIS
Configuring IIS for SSL
Configuring a Central Certificate Store
Configuring IIS bindings
Configuring IIS logging
Managing log files
Configuring NLB across multiple servers
Monitoring load balancing across NLB nodes
Placing NLB nodes into maintenance
Configuring a development/staging/production site scheme
Promoting content in websites
Reporting on website access and errors
Chapter 4: Managing Hyper-V with PowerShell
Introduction
Installing and configuring Hyper-V
Configuring NUMA
Securing Hyper-V
Hyper-V networking
Creating virtual machines
Managing VM state
Configuring VM networking
Configuring VM hardware
Quickly deploying VMs using a template
Managing and reporting on VM snapshots
Monitoring Hyper-V utilization and performance
Synchronizing networks between Hyper-V hosts
Hyper-V replication
Migrating VMs between hosts
Migrating VM storage between hosts
Using failover clustering to make VMs highly available
Chapter 5: Managing Storage with PowerShell
Introduction
Managing NTFS file permissions
Managing NTFS alternate streams
Configuring NTFS deduplication
Monitoring NTFS deduplication
Configuring storage pools
Reporting on storage pools
Managing file quotas
Chapter 6: Managing Network Shares with PowerShell
Introduction
Creating and securing CIFS shares
Accessing CIFS shares from PowerShell
Creating iSCSI target and virtual disk
Using a iSCSI disk
Configuring and using iSNS
Creating an NFS export
Mounting NFS exports
Making CIFS shares highly available
Configuring DFS and DFSR replication
Configuring BranchCache
Chapter 7: Managing Windows Updates with PowerShell
Introduction
Installing Windows Server Update Services
Configuring WSUS update synchronization
Configuring the Windows update client
Creating computer groups
Configuring WSUS auto-approvals
Reporting missing updates
Installing updates
Uninstalling updates
Configuring WSUS to inventory clients
Creating an update report
Exporting WSUS data to Excel
Chapter 8: Managing Printers with PowerShell
Introduction
Setting up and sharing printers
Changing printer drivers
Reporting on printer security
Adding and removing printer security
Mapping clients to printers
Enabling Branch Office Direct Printing
Reporting on printer usage
Chapter 9: Troubleshooting Servers with PowerShell
Introduction
Testing if a server is responding
Using troubleshooting packs
Using Best Practices Analyzers
Searching event logs for specific events
Forwarding event logs to a central log server
Chapter 10: Managing Performance with PowerShell
Introduction
Reading performance counters
Configuring Data Collector Sets
Reporting on performance data
Generating graphs
Creating a server performance report
Chapter 11: Inventorying Servers with PowerShell
Introduction
Inventorying hardware with PowerShell
Inventorying the installed software
Inventory system configuration
Reporting on system security
Creating a change report
Exporting a configuration report to Word
Chapter 12: Server Backup
Introduction
Configuring backup policies
Initiating backups manually
Restoring files
Restoring Windows system state
Restoring application data
Creating a daily backup report

What You Will Learn

  • Streamline routine administration processes
  • Automate the implementation of entire AD infrastructures
  • Generate automatic reports that highlight unexpected changes in your environment
  • Monitor performance and report on system utilization in detailed graphs and analysis
  • Create and manage a reliable and redundant Hyper-V environment
  • Utilize the Best Practices Analyzer from Microsoft to ensure your environment is configured optimally
  • Manage the patch level of your enterprise
  • Utilize multiple protocols to share information in a heterogeneous environment

In Detail

Automating server tasks allows administrators to repeatedly perform the same, or similar, tasks over and over again. With PowerShell scripts, you can automate server tasks and reduce manual input, allowing you to focus on more important tasks.

Windows Server 2012 Automation with PowerShell Cookbook
will show several ways for a Windows administrator to automate and streamline his/her job. Learn how to automate server tasks to ease your day-to-day operations, generate performance and configuration reports, and troubleshoot and resolve critical problems.

Windows Server 2012 Automation with PowerShell
Cookbook will introduce you to the advantages of using Windows Server 2012 and PowerShell. Each recipe is a building block that can easily be combined to provide larger and more useful scripts to automate your systems. The recipes are packed with examples and real world experience to make the job of managing and administrating Windows servers easier.

The book begins with automation of common Windows Networking components such as AD, DHCP, DNS, and PKI, managing Hyper-V, and backing up the server environment. By the end of the book you will be able to use PowerShell scripts to automate tasks such as performance monitoring, reporting, analyzing the environment to match best practices, and troubleshooting.

Authors

Table of Contents

Chapter 1: Understanding PowerShell Scripting
Introduction
Managing security on PowerShell scripts
Creating and using functions
Creating and using modules
Creating and using PowerShell profiles
Passing variables to functions
Validating parameters in functions
Piping data to functions
Recording sessions with transcripts
Signing PowerShell scripts
Sending e-mail
Sorting and filtering
Using formatting to export numbers
Using formatting to export data views
Using jobs
Dealing with errors in PowerShell
Tuning PowerShell scripts for performance
Creating and using Cmdlets
Chapter 2: Managing Windows Network Services with PowerShell
Introduction
Configuring static networking
Installing domain controllers
Configuring zones in DNS
Configuring DHCP scopes
Configuring DHCP server failover
Converting DHCP addresses to static
Building out a PKI environment
Creating AD users
Searching for and reporting on AD users
Finding expired computers in AD
Creating and e-mailing a superuser report
Chapter 3: Managing IIS with PowerShell
Introduction
Installing and configuring IIS
Configuring IIS for SSL
Configuring a Central Certificate Store
Configuring IIS bindings
Configuring IIS logging
Managing log files
Configuring NLB across multiple servers
Monitoring load balancing across NLB nodes
Placing NLB nodes into maintenance
Configuring a development/staging/production site scheme
Promoting content in websites
Reporting on website access and errors
Chapter 4: Managing Hyper-V with PowerShell
Introduction
Installing and configuring Hyper-V
Configuring NUMA
Securing Hyper-V
Hyper-V networking
Creating virtual machines
Managing VM state
Configuring VM networking
Configuring VM hardware
Quickly deploying VMs using a template
Managing and reporting on VM snapshots
Monitoring Hyper-V utilization and performance
Synchronizing networks between Hyper-V hosts
Hyper-V replication
Migrating VMs between hosts
Migrating VM storage between hosts
Using failover clustering to make VMs highly available
Chapter 5: Managing Storage with PowerShell
Introduction
Managing NTFS file permissions
Managing NTFS alternate streams
Configuring NTFS deduplication
Monitoring NTFS deduplication
Configuring storage pools
Reporting on storage pools
Managing file quotas
Chapter 6: Managing Network Shares with PowerShell
Introduction
Creating and securing CIFS shares
Accessing CIFS shares from PowerShell
Creating iSCSI target and virtual disk
Using a iSCSI disk
Configuring and using iSNS
Creating an NFS export
Mounting NFS exports
Making CIFS shares highly available
Configuring DFS and DFSR replication
Configuring BranchCache
Chapter 7: Managing Windows Updates with PowerShell
Introduction
Installing Windows Server Update Services
Configuring WSUS update synchronization
Configuring the Windows update client
Creating computer groups
Configuring WSUS auto-approvals
Reporting missing updates
Installing updates
Uninstalling updates
Configuring WSUS to inventory clients
Creating an update report
Exporting WSUS data to Excel
Chapter 8: Managing Printers with PowerShell
Introduction
Setting up and sharing printers
Changing printer drivers
Reporting on printer security
Adding and removing printer security
Mapping clients to printers
Enabling Branch Office Direct Printing
Reporting on printer usage
Chapter 9: Troubleshooting Servers with PowerShell
Introduction
Testing if a server is responding
Using troubleshooting packs
Using Best Practices Analyzers
Searching event logs for specific events
Forwarding event logs to a central log server
Chapter 10: Managing Performance with PowerShell
Introduction
Reading performance counters
Configuring Data Collector Sets
Reporting on performance data
Generating graphs
Creating a server performance report
Chapter 11: Inventorying Servers with PowerShell
Introduction
Inventorying hardware with PowerShell
Inventorying the installed software
Inventory system configuration
Reporting on system security
Creating a change report
Exporting a configuration report to Word
Chapter 12: Server Backup
Introduction
Configuring backup policies
Initiating backups manually
Restoring files
Restoring Windows system state
Restoring application data
Creating a daily backup report

Book Details

ISBN 139781849689465
Paperback372 pages
Read More