Book Image

Windows PowerShell for .NET Developers - Second Edition - Second Edition

Book Image

Windows PowerShell for .NET Developers - Second Edition - Second Edition

Overview of this book

Windows PowerShell 5.0 for .NET Developers is your self-start guide to performing automation using Windows PowerShell. This book will help you to understand the PowerShell syntax and grammar and will also teach you techniques to remove the rough edges of manual deployments. Packed with PowerShell scripts and sample C# codes to automate tasks, it also includes real-world scenarios such as administrating office servers to help you save time and perform deployments swiftly and efficiently. The book begins with the Windows PowerShell basics, explores the significant features of Windows Management Framework 5.0, covers the basic concepts of Desired State Configuration and the importance of idempotent deployments. By the end of the book, you will have a good understanding of Windows PowerShell’s features and will be able to automate your tasks and manage configuration effectively.
Table of Contents (13 chapters)

Scripting the cmdlet style


This is a self-paced guide for you to learn Windows PowerShell in order to perform IT automation. The management goals of IT are to simplify the creation and operation of computing environments. IT professionals and developers need to complete their daily tasks swiftly in order to avoid chaos.

Windows PowerShell is an object-based and distributed automation platform that enables IT professionals and developers to speed up their development tasks and deployments. The Windows PowerShell scripting language makes daily tasks more productive.

The goal of this book is to share the features of Windows PowerShell 5.0 and how developers can utilize its benefits. Let's dive into Windows PowerShell 5.0 so that we can design our infrastructure, automate our daily tasks, manage drifts in our environment, quicken the deployment tasks, and so on.

The IT industry is growing rapidly; to adapt and minimize the impact, we need to plan and design our infrastructure so as to meet the growing needs with minimum chaos. It's challenging and really difficult to automate the tasks without PowerShell. Windows PowerShell plays a major role by not only enabling task automation, but also allowing us to design our infrastructure with the help of IT professionals and developers.

Developers from the .NET background can quickly understand PowerShell. Developers can easily create their own cmdlets (cmdlets, pronounced as command lets, are nothing but the lightweight commands used in Windows PowerShell) and leverage it in the infrastructure as needed. Thus, the deployment tasks become easier and the productivity increases by automation.

Come, let's dive into Windows PowerShell 5.0 and its features.

Note

Before we begin, let's note that Windows PowerShell 5.0 is not a stable release. So, if you identify any bugs in the command, you can file a case at http://connect.microsoft.com.

This self-paced guide will discuss the following:

  • Working with PowerShell cmdlets

  • PowerShell scripting

  • Exploring PowerShell modules

  • Exploring the XML, COM, and .NET objects

  • Exploring JSON, REST API, and Web Services

  • Features of Windows PowerShell 5.0

  • Exploring DSC to configure servers

  • Exploring web technologies using PowerShell

  • Consuming API in C# and PowerShell

  • Using PowerShell codes in C#

Note

If you are interested in knowing the origin of Windows PowerShell 5.0, you should read Monad Manifesto at:

http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-01-91-05-67/Monad-Manifesto-_2D00_-Public.doc