SlideShare a Scribd company logo
1 of 15
PowerShell
v4
Desired State
Configuration
Windows does not work that way!
•Win32 API
•COM
•WMI
•.NET
PowerShell is …
• .NET underneath
• Structured data and behaviours
• Objects in, objects out
• A dynamic COM client
• A WMI/CIM native
• … capable of text manipulation and Regular Expressions too
PowerShell Desired State Configuration
is …
• New language KeywordsKeywords to declaratively define ConfigurationsConfigurations
• Configurations that compile to Managed Object Format (MOF)
• DSC ProvidersDSC Providers to apply Configurations to ResourcesResources
• New CmdletsCmdlets to test, apply, and restore Configurations on demand
• Local Configuration ManagerLocal Configuration Manager to maintain config and PullPull updates
• DSC ServiceDSC Service to host Configurations and Providers centrally for Pull
• Available in-the-box with Windows Server 2012 R2 on October 18th
Built-in Resources include …
•Archive
•Environment
•File
•Group
•Log
•Package
•WindowsProcess
•Registry
•WindowsFeature
•Script
•Service
•User
Configuration DemoConfig {
param (…)
Node localhost {
WindowsFeature Telnet {
Ensure = 'Present' # or 'Absent'
Name = 'Telnet-Client'
}
}
}
instance of MSFT_RoleResource as
$MSFT_RoleResource1ref
{
ResourceID = "[WindowsFeature]Telnet";
Ensure = "Present";
SourceInfo = "::6::9::WindowsFeature";
Name = "Telnet-Client";
ModuleName = "MSFT_RoleResource";
ModuleVersion = "1.0";
};
instance of OMI_ConfigurationDocument { … };
Local Configuration Manager
• Responsible for validating and applying configuration
• Runs under the context of the SYSTEM account
• Only Administrators can submit configuration
• Defaults to running in Push mode on a clean OS / PSv4 install
• Supports Pull mode via file share or web service
• Pull mode handles custom Resource Provider deployment
• A single MOF file must encompass all the configuration
PS /> Start-
DscConfiguration
DSC Service
• An IIS-hosted OData web service
• An optional feature in Server 2012 R2
• Consists of two components:
• The Pull Server
• The Compliance Server
• No documentation yet
Custom DSC Providers
• Custom Resources are a formalisation of the Script Resource:
• Get-TargetResource
• Set-TargetResource
• Test-TargetResource
• MOF Schema with a Key and properties
• Existing examples:
• DHCP (by @gpduck)
• Hosts file (on github.com/PowerShellOrg/DSC)
• Website (in the Hands-On Lab)
• Expect to develop custom resources as an early adopter
What about System Center?
• Configuration Manager is expected to be used by the
Enterprise. DSC is expected to be used for Azure and for
DevOps.
• Virtual Machine Manager 2012 R2 can call DSC during
provisioning
With DSC, Windows becomes text files
•Versionable
•Indexable
•Auditable
•Self-documenting
Without DSC, follow the same principals
• Idempotency
• Separate intent from implementation
• Separate environmental configuration differences
• Server names
• Credentials
• Number machines per role
Jason Stangroome
@jstangroome
blog.stangroome.com

More Related Content

What's hot

The RDBMS You Should Be Using
The RDBMS You Should Be UsingThe RDBMS You Should Be Using
The RDBMS You Should Be Using
ColdFusionConference
 

What's hot (20)

60 Admin Tips
60 Admin Tips60 Admin Tips
60 Admin Tips
 
Terraform - Shared Definitions and Variable Inheritance
Terraform - Shared Definitions and Variable InheritanceTerraform - Shared Definitions and Variable Inheritance
Terraform - Shared Definitions and Variable Inheritance
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Aem dispatcher – tips & tricks
Aem dispatcher – tips & tricksAem dispatcher – tips & tricks
Aem dispatcher – tips & tricks
 
Hashicorp @ JUST EAT - Part 2
Hashicorp @ JUST EAT - Part 2Hashicorp @ JUST EAT - Part 2
Hashicorp @ JUST EAT - Part 2
 
Infrastructure as Code for Azure: ARM or Terraform?
Infrastructure as Code for Azure: ARM or Terraform?Infrastructure as Code for Azure: ARM or Terraform?
Infrastructure as Code for Azure: ARM or Terraform?
 
The RDBMS You Should Be Using
The RDBMS You Should Be UsingThe RDBMS You Should Be Using
The RDBMS You Should Be Using
 
Containerization with Microsoft Azure
Containerization with Microsoft AzureContainerization with Microsoft Azure
Containerization with Microsoft Azure
 
Amazon EC2 Container Service: Deep Dive
Amazon EC2 Container Service: Deep DiveAmazon EC2 Container Service: Deep Dive
Amazon EC2 Container Service: Deep Dive
 
A journey-to-a-button
A journey-to-a-buttonA journey-to-a-button
A journey-to-a-button
 
Nagios Conference 2011 - Nicholas Scott - Nagios Performance Tuning
Nagios Conference 2011 - Nicholas Scott - Nagios Performance TuningNagios Conference 2011 - Nicholas Scott - Nagios Performance Tuning
Nagios Conference 2011 - Nicholas Scott - Nagios Performance Tuning
 
Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )
 
So Many Docker Platforms...so little time
So Many Docker Platforms...so little timeSo Many Docker Platforms...so little time
So Many Docker Platforms...so little time
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
 
Securing Your Deployment with MongoDB and Red Hat's Identity Management in Re...
Securing Your Deployment with MongoDB and Red Hat's Identity Management in Re...Securing Your Deployment with MongoDB and Red Hat's Identity Management in Re...
Securing Your Deployment with MongoDB and Red Hat's Identity Management in Re...
 
Fixing Domino Server Sickness
Fixing Domino Server SicknessFixing Domino Server Sickness
Fixing Domino Server Sickness
 
Containerization in microsoft azure
Containerization in microsoft azureContainerization in microsoft azure
Containerization in microsoft azure
 
Word press and containers
Word press and containersWord press and containers
Word press and containers
 
Cassandra Summit 2014: Deploying Cassandra for Call of Duty
Cassandra Summit 2014: Deploying Cassandra for Call of DutyCassandra Summit 2014: Deploying Cassandra for Call of Duty
Cassandra Summit 2014: Deploying Cassandra for Call of Duty
 
Debugging the Web with Fiddler
Debugging the Web with FiddlerDebugging the Web with Fiddler
Debugging the Web with Fiddler
 

Viewers also liked

Managing enterprise with PowerShell remoting
Managing enterprise with PowerShell remotingManaging enterprise with PowerShell remoting
Managing enterprise with PowerShell remoting
Concentrated Technology
 
Automating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShellAutomating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShell
Concentrated Technology
 

Viewers also liked (20)

Windows PowerShell Desired State Configuration (DSC) for Veteran Chefs - Chef...
Windows PowerShell Desired State Configuration (DSC) for Veteran Chefs - Chef...Windows PowerShell Desired State Configuration (DSC) for Veteran Chefs - Chef...
Windows PowerShell Desired State Configuration (DSC) for Veteran Chefs - Chef...
 
PowerShell custom properties
PowerShell custom propertiesPowerShell custom properties
PowerShell custom properties
 
Automating ad with powershell
Automating ad with powershellAutomating ad with powershell
Automating ad with powershell
 
Managing SQLserver
Managing SQLserverManaging SQLserver
Managing SQLserver
 
PS error handling and debugging
PS error handling and debuggingPS error handling and debugging
PS error handling and debugging
 
PowerShell 8tips
PowerShell 8tipsPowerShell 8tips
PowerShell 8tips
 
Combining output from multiple sources
Combining output from multiple sourcesCombining output from multiple sources
Combining output from multiple sources
 
Ad disasters & how to prevent them
Ad disasters & how to prevent themAd disasters & how to prevent them
Ad disasters & how to prevent them
 
Server Core2
Server Core2Server Core2
Server Core2
 
Managing enterprise with PowerShell remoting
Managing enterprise with PowerShell remotingManaging enterprise with PowerShell remoting
Managing enterprise with PowerShell remoting
 
Basic PowerShell Toolmaking - Spiceworld 2016 session
Basic PowerShell Toolmaking - Spiceworld 2016 sessionBasic PowerShell Toolmaking - Spiceworld 2016 session
Basic PowerShell Toolmaking - Spiceworld 2016 session
 
PowerShell Functions
PowerShell FunctionsPowerShell Functions
PowerShell Functions
 
Best free tools for win database admin
Best free tools for win database adminBest free tools for win database admin
Best free tools for win database admin
 
From VB Script to PowerShell
From VB Script to PowerShellFrom VB Script to PowerShell
From VB Script to PowerShell
 
No-script PowerShell v2
No-script PowerShell v2No-script PowerShell v2
No-script PowerShell v2
 
PowerShell crash course
PowerShell crash coursePowerShell crash course
PowerShell crash course
 
Automating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShellAutomating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShell
 
PowerShell crashcourse for sharepoint
PowerShell crashcourse for sharepointPowerShell crashcourse for sharepoint
PowerShell crashcourse for sharepoint
 
Implementing dr w. hyper v clustering
Implementing dr w. hyper v clusteringImplementing dr w. hyper v clustering
Implementing dr w. hyper v clustering
 
Meet Windows PowerShell
Meet Windows PowerShellMeet Windows PowerShell
Meet Windows PowerShell
 

Similar to PowerShell v4 Desired State Configuration

Jan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configurationJan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configuration
Nordic Infrastructure Conference
 
Microsoft Offical Course 20410C_02
Microsoft Offical Course 20410C_02Microsoft Offical Course 20410C_02
Microsoft Offical Course 20410C_02
gameaxt
 
Justin Morris - Understanding how lync server 2013 leverages the complete mic...
Justin Morris - Understanding how lync server 2013 leverages the complete mic...Justin Morris - Understanding how lync server 2013 leverages the complete mic...
Justin Morris - Understanding how lync server 2013 leverages the complete mic...
Nordic Infrastructure Conference
 
WKDNUG SP2010 Development Presentation
WKDNUG SP2010 Development PresentationWKDNUG SP2010 Development Presentation
WKDNUG SP2010 Development Presentation
Rob Wilson
 
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM France Lab
 

Similar to PowerShell v4 Desired State Configuration (20)

Server 2016 sneak peek
Server 2016 sneak peekServer 2016 sneak peek
Server 2016 sneak peek
 
Jan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configurationJan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configuration
 
Configuration management comes to Windows
Configuration management comes to WindowsConfiguration management comes to Windows
Configuration management comes to Windows
 
Microsoft Offical Course 20410C_02
Microsoft Offical Course 20410C_02Microsoft Offical Course 20410C_02
Microsoft Offical Course 20410C_02
 
Tech-Spark: SQL Server on Linux
Tech-Spark: SQL Server on LinuxTech-Spark: SQL Server on Linux
Tech-Spark: SQL Server on Linux
 
Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016
 
SOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesSOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class Libraries
 
Bcit win8 ws2012 session
Bcit win8 ws2012 sessionBcit win8 ws2012 session
Bcit win8 ws2012 session
 
Powering up on PowerShell - BSides Greenville 2019
Powering up on PowerShell  - BSides Greenville 2019Powering up on PowerShell  - BSides Greenville 2019
Powering up on PowerShell - BSides Greenville 2019
 
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
 
Justin Morris - Understanding how lync server 2013 leverages the complete mic...
Justin Morris - Understanding how lync server 2013 leverages the complete mic...Justin Morris - Understanding how lync server 2013 leverages the complete mic...
Justin Morris - Understanding how lync server 2013 leverages the complete mic...
 
WKDNUG SP2010 Development Presentation
WKDNUG SP2010 Development PresentationWKDNUG SP2010 Development Presentation
WKDNUG SP2010 Development Presentation
 
Preparing your dockerised application for production deployment
Preparing your dockerised application for production deploymentPreparing your dockerised application for production deployment
Preparing your dockerised application for production deployment
 
Introduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerIntroduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and Docker
 
Powering up on PowerShell - BSides Charleston - Nov 2018
Powering up on PowerShell - BSides Charleston - Nov 2018Powering up on PowerShell - BSides Charleston - Nov 2018
Powering up on PowerShell - BSides Charleston - Nov 2018
 
Docker Datacenter Overview and Production Setup Slides
Docker Datacenter Overview and Production Setup SlidesDocker Datacenter Overview and Production Setup Slides
Docker Datacenter Overview and Production Setup Slides
 
Docker for PHP Developers - Madison PHP 2017
Docker for PHP Developers - Madison PHP 2017Docker for PHP Developers - Madison PHP 2017
Docker for PHP Developers - Madison PHP 2017
 
Extending Zend_Tool
Extending Zend_ToolExtending Zend_Tool
Extending Zend_Tool
 
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
 
T5 - Mise en place de votre processus DevOps Ofice, Office 365, SharePoint - ...
T5 - Mise en place de votre processus DevOps Ofice, Office 365, SharePoint - ...T5 - Mise en place de votre processus DevOps Ofice, Office 365, SharePoint - ...
T5 - Mise en place de votre processus DevOps Ofice, Office 365, SharePoint - ...
 

Recently uploaded

Recently uploaded (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

PowerShell v4 Desired State Configuration

  • 2. Windows does not work that way! •Win32 API •COM •WMI •.NET
  • 3. PowerShell is … • .NET underneath • Structured data and behaviours • Objects in, objects out • A dynamic COM client • A WMI/CIM native • … capable of text manipulation and Regular Expressions too
  • 4. PowerShell Desired State Configuration is … • New language KeywordsKeywords to declaratively define ConfigurationsConfigurations • Configurations that compile to Managed Object Format (MOF) • DSC ProvidersDSC Providers to apply Configurations to ResourcesResources • New CmdletsCmdlets to test, apply, and restore Configurations on demand • Local Configuration ManagerLocal Configuration Manager to maintain config and PullPull updates • DSC ServiceDSC Service to host Configurations and Providers centrally for Pull • Available in-the-box with Windows Server 2012 R2 on October 18th
  • 5. Built-in Resources include … •Archive •Environment •File •Group •Log •Package •WindowsProcess •Registry •WindowsFeature •Script •Service •User
  • 6. Configuration DemoConfig { param (…) Node localhost { WindowsFeature Telnet { Ensure = 'Present' # or 'Absent' Name = 'Telnet-Client' } } }
  • 7. instance of MSFT_RoleResource as $MSFT_RoleResource1ref { ResourceID = "[WindowsFeature]Telnet"; Ensure = "Present"; SourceInfo = "::6::9::WindowsFeature"; Name = "Telnet-Client"; ModuleName = "MSFT_RoleResource"; ModuleVersion = "1.0"; }; instance of OMI_ConfigurationDocument { … };
  • 8. Local Configuration Manager • Responsible for validating and applying configuration • Runs under the context of the SYSTEM account • Only Administrators can submit configuration • Defaults to running in Push mode on a clean OS / PSv4 install • Supports Pull mode via file share or web service • Pull mode handles custom Resource Provider deployment • A single MOF file must encompass all the configuration
  • 10. DSC Service • An IIS-hosted OData web service • An optional feature in Server 2012 R2 • Consists of two components: • The Pull Server • The Compliance Server • No documentation yet
  • 11. Custom DSC Providers • Custom Resources are a formalisation of the Script Resource: • Get-TargetResource • Set-TargetResource • Test-TargetResource • MOF Schema with a Key and properties • Existing examples: • DHCP (by @gpduck) • Hosts file (on github.com/PowerShellOrg/DSC) • Website (in the Hands-On Lab) • Expect to develop custom resources as an early adopter
  • 12. What about System Center? • Configuration Manager is expected to be used by the Enterprise. DSC is expected to be used for Azure and for DevOps. • Virtual Machine Manager 2012 R2 can call DSC during provisioning
  • 13. With DSC, Windows becomes text files •Versionable •Indexable •Auditable •Self-documenting
  • 14. Without DSC, follow the same principals • Idempotency • Separate intent from implementation • Separate environmental configuration differences • Server names • Credentials • Number machines per role