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)

Exploring Windows Remote Management and CIM


Every IT professional is interested in managing their servers remotely. It would be better if we can achieve our tasks on remote machines from our desk than having to travel to a data center (unless there's a physical failure).

Remoting is the key feature of Windows PowerShell. However, most security administrators consider this to be a security risk. This is not completely true; Windows PowerShell remoting works based on a two-way authentication (a mutual authentication), and this inherits the feature of the Active Directory Kerberos protocol. This applies only for domain-joined machines.

We will cover the following topics:

  • Understanding WS-Management cmdlets

  • The HTTP listener

  • The HTTPS listener

  • Exploring the CIM commands

  • Exploring the CIM methods

  • Querying the remote machines using CIM

Windows PowerShell remoting

The Windows PowerShell remoting feature makes it richer, and this works based on the WS-Management protocol and the Windows Remote Management...