Book Image

Windows PowerShell for .NET Developers - Second Edition

By : Chendrayan Venkatesan, Sherif Talaat
Book Image

Windows PowerShell for .NET Developers - Second Edition

By: Chendrayan Venkatesan, Sherif Talaat

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)

Management OData IIS Extensions

OData, which stands for Open Data Protocol, is a RESTful web protocol. OData is based on HTTP and JSON, and using this, we can perform operations such as querying and updating.

We will cover the ODataUtils class before starting with OData IIS Extensions.

OData allows us to create a client-side module based on the OData endpoints. This is based on CDXML. Just take a look at the Microsoft.PowerShell.ODataUtils module.

This module has a single command, Export-ODataEndpointProxy, but is very powerful for exploring management data.

Let's create a client-side module using the following code:

$Odata = @{
  Uri = ''
  MetadataUri = '$metadata'
  OutputModule = 'C:\Temp\DemoModule'
  AllowUnSecureConnection = $true
Export-odataEndpointProxy @Odata

The output is illustrated in the following image:

In the preceding example...