Book Image

SQL Server 2014 with PowerShell v5 Cookbook

By : Donabel Santos
Book Image

SQL Server 2014 with PowerShell v5 Cookbook

By: Donabel Santos

Overview of this book

Table of Contents (21 chapters)
SQL Server 2014 with PowerShell v5 Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 11. Helpful PowerShell Snippets

In this chapter, we will cover the following topics:

  • Documenting the PowerShell script for Get-Help

  • Getting history

  • Getting a timestamp

  • Getting more error messages

  • Listing processes

  • Getting aliases

  • Exporting to CSV and XML

  • Using Invoke-Expression

  • Testing regular expressions

  • Managing folders

  • Manipulating files

  • Compressing files

  • Searching for files

  • Reading an event log

  • Sending an e-mail

  • Embedding C# Code

  • Creating an HTML report

  • Parsing XML

  • Extracting data from a web service

  • Using PowerShell remoting