Book Image

Windows PowerShell for .NET Developers - Second Edition

Book Image

Windows PowerShell for .NET Developers - 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)

Types of deployment modes


Windows PowerShell has two configuration modes: push and pull. In this topic, we will learn about implementing both push and pull modes. Before we start discussing the types of configuration modes, let's recap the high-level details of DSC.

Using Windows PowerShell, we will write a configuration. This contains the elements we need to configure on target nodes.

After the successful execution of the configuration script, we get a Managed Object Format file. The MOF files are then distributed to the target nodes.

Local Configuration Manager in the target node will parse the received configurations and ensure that the nodes are in the desired state.

Distributing the MOF files to the target node is very important. To carry this out, we need to follow either a push or pull method. Most organizations use the pull mode for the reasons of standard, security, and reliability.

The push mode

As the term implies, the push mode is unidirectional, and the action is immediate. The configurations...