Skip to Main Content
Learn PowerShell Core 6.0
book

Learn PowerShell Core 6.0

by David das Neves, Jan-Hendrik Peters
July 2018
Beginner content levelBeginner
552 pages
13h 18m
English
Packt Publishing
Content preview from Learn PowerShell Core 6.0

Configurations

At the heart of DSC are configurations—your infrastructure as code. Configurations are repeatable and can be versioned, verified, and idempotent. Moreover, they are transportable between different environments—provided those environments should look alike.

When compiled and deployed, configurations will do the same as your existing scripts. While those are imperative (install feature, deploy web app), DSC is declarative.

Take the following example, which illustrates the difference:

# ImperativeInstall-WindowsFeature -Name AD-Domain-Services, RSAT-AD-Tools -IncludeAllSubFeature# What happens if the feature cannot be enabled in your build script?$param = @{    DomainName = 'contoso.com' SafeModeAdministratorPassword = Read-Host ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PowerShell and WMI

PowerShell and WMI

Richard Siddaway

Publisher Resources

ISBN: 9781788838986Supplemental Content