PacktLib: Windows Server 2012 Automation with PowerShell Cookbook

Windows Server 2012 Automation with PowerShell Cookbook

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

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

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

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

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

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

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

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

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

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

Managing Performance with PowerShell

Introduction

Reading performance counters

Configuring Data Collector Sets

Reporting on performance data

Generating graphs

Creating a server performance report

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

Server Backup

Introduction

Configuring backup policies

Initiating backups manually

Restoring files

Restoring Windows system state

Restoring application data

Creating a daily backup report

Index