SlideShare une entreprise Scribd logo
1  sur  22
INTRODUCTION TO DESIRED
STATE CONFIGURATION
(DSC)
JEFFERY HICKS, MVP
JHICKS@JDHITSOLUTIONS.COM
WHAT IS DSC?
• Uses PowerShell syntax
• Create configuration scripts
An extension to the
PowerShell language
• Use PowerShell language and cmdlets to
create and deploy configurations
Create and manage
server configuration
files
• A local configuration manager does the
heavy lifting
Ensures servers are
always configured
the way you need
WHY DSC?
Prevent server configuration “drift”
Separate configuration from implementation
“Continuous” server deployment
Manage servers on-site or in a cloud
Leverage your existing PowerShell skills
REQUIREMENTS
Requires Windows Management Framework 4.0
• PowerShell 4.0
• CIM DSC Namespace
(RootMicrosoftWindowsDesiredStateConfiguration)
• DSC cmdlets, providers and resources
.NET Framework 4.5
Windows Server 2008 R2 SP1 and later
Windows 7 SP1 and later
REQUIREMENTS
Verify KB2883200 for Windows 8.1 and Windows Server 2012
R2
PowerShell remoting must be enabled
Optional: Public Key Infrastructure for SSL and encryption
certificates
DSC ARCHITECTURE
• Configurations deployed to servers
• Use Start-DSCConfiguration to deploy
Push Model
• Servers poll a central server
• HTTP/HTTPS
• SMB
• Use traditional fault tolerance and load balancing
Pull Model
DSC PHASES
• Can include imperative and
declarative commands
• Create MOF definitions
Authoring Phase
• Declarative MOFs staged
• Configuration calculated per
node
Staging Phase
• Declarative configurations
implemented through imperative
providers
“Make It So” Phase
MANAGING CONFIGURATIONS
One configuration (i.e. one
MOF) per server
Managed by Local
Configuration Manager (LCM)
Think modular and plan ahead
Implement the pull model to
simplify management
LOCAL CONFIGURATION MANAGER
Use Get-DSCLocalConfigurationManager to check node settings
• ConfigurationMode
• ApplyOnly
• ApplyAndMonitor
• ApplyAndAutoCorrect
• RefreshMode
• Push
• Pull
• RefreshFrequencyMins (15min when using Pull)
• ConfigurationModeFrequencyMins (30min)
Set with a configuration
CREATING A CONFIGURATION
Defined in a PowerShell script
Configuration keyword (new command type)
Define Node
Configure resources
DSC RESOURCES
Managed element you define in your configuration
Core resources shipped “out of the box”
Additional “experimental” resources shipped from Microsoft
Community developed resources
You can write your own
DSC RESOURCES – OUT OF THE BOX
Provider Description
Archive Unpacks archive (.zip) files at specific paths on target nodes.
Environment Manages system environment variables on target nodes.
File Manages files and directories on target nodes.
Group Manages local groups on target nodes.
Log Logs configuration messages.
Package
Installs and manages packages, such as Windows Installer and setup.exe
packages, on target nodes.
Registry Manages registry keys and values on target nodes.
Script Runs Windows PowerShell script blocks on target nodes.
Service Manages services on target nodes.
User Manages local user accounts on target nodes.
Windows Feature Adds or removes Windows features and roles on target nodes.
Windows Process Configures Windows processes on target nodes.
Possible Resource settings Possible Resource values
Configuration key word
Desired config for nodes
Install a Windows feature
Configure a service
Create a directory
DEPLOYING A CONFIGURATION
Defines a configuration
called ‘ChicagoCore’
Configuration has hard
code node names
Configuration pushed to
every defined node
GET DSC CONFIGURATION
Get last applied configuration
• Gets objects for each type of resource
• Use Where-Object to filter for a specific resource or
setting
• Use Where-Object to filter on multiple computers
GET DSC CONFIGURATION
PS C:> Get-DSCConfiguration –cimsession CHI-FP02
PS C:> (Get-DSCConfiguration –cimsession
$all).where({$_.cimclass –match "service"}) | Select
PSComputername, Name,StartupType,State
TEST AND RESET A CONFIGURATION
Desired state
maintained by
local
configuration
manager
Test for
configuration
compliance
Force
reconfiguration
Or push new
configurations
Pull model ensures servers have desired configuration
TEST CONFIGURATION
Test-DSCConfiguration returns True or False
Recommend testing one server at a time
Use –verbose to see details
PS C:> Test-DSCConfiguration –cimsession CHI-
FP02
RESOURCES
• The DSC Book
• free ebook at http://powershell.org/wp/ebooks
• PowerShell in Depth: An Administrator’s Guide 2nd Edition
• http://bit.ly/PSinDepth2
• DSC Resources on GitHub
• https://github.com/powershellorg/dsc
• PowerShell Team blog
• http://blogs.msdn.com/b/powershell/
• Pluralsight training videos
• http://www.pluralsight.com
SUMMARY
DSC requires PowerShell 4.0
DSC leverages your existing PowerShell
skills
DSC will become the “norm” for server
configuration
Define a server configuration and know
that it will always be that way
THANK YOU
http://jdhitsolutions.com/blog
jhicks@jdhitsolutions.com
@JeffHicks
http://plus.google.com/+JefferyHicks

Contenu connexe

Tendances

Understanding the Windows Server Administration Fundamentals (Part-1)
Understanding the Windows Server Administration Fundamentals (Part-1)Understanding the Windows Server Administration Fundamentals (Part-1)
Understanding the Windows Server Administration Fundamentals (Part-1)Tuan Yang
 
Windows Server 2019.pptx
Windows Server 2019.pptxWindows Server 2019.pptx
Windows Server 2019.pptxmasbulosoke
 
Lesson 6: Dynamic Host Configuration Protocol A
Lesson 6: Dynamic Host Configuration Protocol ALesson 6: Dynamic Host Configuration Protocol A
Lesson 6: Dynamic Host Configuration Protocol AMahmmoud Mahdi
 
Presentation on Domain Name System
Presentation on Domain Name SystemPresentation on Domain Name System
Presentation on Domain Name SystemChinmay Joshi
 
Network and System Administration chapter 2
Network and System Administration chapter 2Network and System Administration chapter 2
Network and System Administration chapter 2IgguuMuude
 
What is a Server
What is a ServerWhat is a Server
What is a ServerKuwait10
 
The linux file system structure
The linux file system structureThe linux file system structure
The linux file system structureTeja Bheemanapally
 
Network servers
Network serversNetwork servers
Network serversOnline
 
02-Active Directory Domain Services.pptx
02-Active Directory Domain Services.pptx02-Active Directory Domain Services.pptx
02-Active Directory Domain Services.pptxAdiWidyanto2
 
System Administration: Introduction to system administration
System Administration: Introduction to system administrationSystem Administration: Introduction to system administration
System Administration: Introduction to system administrationKhang-Ling Loh
 

Tendances (20)

Understanding the Windows Server Administration Fundamentals (Part-1)
Understanding the Windows Server Administration Fundamentals (Part-1)Understanding the Windows Server Administration Fundamentals (Part-1)
Understanding the Windows Server Administration Fundamentals (Part-1)
 
Windows Server 2019.pptx
Windows Server 2019.pptxWindows Server 2019.pptx
Windows Server 2019.pptx
 
Lesson 6: Dynamic Host Configuration Protocol A
Lesson 6: Dynamic Host Configuration Protocol ALesson 6: Dynamic Host Configuration Protocol A
Lesson 6: Dynamic Host Configuration Protocol A
 
Filepermissions in linux
Filepermissions in linuxFilepermissions in linux
Filepermissions in linux
 
Presentation on Domain Name System
Presentation on Domain Name SystemPresentation on Domain Name System
Presentation on Domain Name System
 
Dns
DnsDns
Dns
 
IP classes
IP classesIP classes
IP classes
 
File server
File serverFile server
File server
 
Network and System Administration chapter 2
Network and System Administration chapter 2Network and System Administration chapter 2
Network and System Administration chapter 2
 
A History of Linux
A History of LinuxA History of Linux
A History of Linux
 
What is a Server
What is a ServerWhat is a Server
What is a Server
 
The linux file system structure
The linux file system structureThe linux file system structure
The linux file system structure
 
Domain Name System
Domain Name SystemDomain Name System
Domain Name System
 
Linux Operating System
Linux Operating SystemLinux Operating System
Linux Operating System
 
Windows server
Windows serverWindows server
Windows server
 
Network servers
Network serversNetwork servers
Network servers
 
02-Active Directory Domain Services.pptx
02-Active Directory Domain Services.pptx02-Active Directory Domain Services.pptx
02-Active Directory Domain Services.pptx
 
Window server editions
Window server editionsWindow server editions
Window server editions
 
Network operating system
Network operating systemNetwork operating system
Network operating system
 
System Administration: Introduction to system administration
System Administration: Introduction to system administrationSystem Administration: Introduction to system administration
System Administration: Introduction to system administration
 

En vedette

PowerShell v4 Desired State Configuration
PowerShell v4 Desired State ConfigurationPowerShell v4 Desired State Configuration
PowerShell v4 Desired State ConfigurationJason Stangroome
 
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...Chef
 
10 PowerShell Mistakes, Trips and Traps
10 PowerShell Mistakes, Trips and Traps10 PowerShell Mistakes, Trips and Traps
10 PowerShell Mistakes, Trips and TrapsJeffery Hicks
 
Venture Capital - An Introduction
Venture Capital - An IntroductionVenture Capital - An Introduction
Venture Capital - An IntroductionJanis Zech
 
Tribal Nova Docker workshop
Tribal Nova Docker workshopTribal Nova Docker workshop
Tribal Nova Docker workshopNicolas Degardin
 
Docker - Containervirtualisierung leichtgemacht
Docker - Containervirtualisierung leichtgemachtDocker - Containervirtualisierung leichtgemacht
Docker - Containervirtualisierung leichtgemachtB1 Systems GmbH
 
Visualising Basic Concepts of Docker
Visualising Basic Concepts of Docker Visualising Basic Concepts of Docker
Visualising Basic Concepts of Docker vishnu rao
 
Managing enterprise with PowerShell remoting
Managing enterprise with PowerShell remotingManaging enterprise with PowerShell remoting
Managing enterprise with PowerShell remotingConcentrated Technology
 
Basic PowerShell Toolmaking - Spiceworld 2016 session
Basic PowerShell Toolmaking - Spiceworld 2016 sessionBasic PowerShell Toolmaking - Spiceworld 2016 session
Basic PowerShell Toolmaking - Spiceworld 2016 sessionRob Dunn
 
Ive got a powershell secret
Ive got a powershell secretIve got a powershell secret
Ive got a powershell secretChris Conte
 
PowerShell Functions
PowerShell FunctionsPowerShell Functions
PowerShell Functionsmikepfeiffer
 

En vedette (20)

PowerShell v4 Desired State Configuration
PowerShell v4 Desired State ConfigurationPowerShell v4 Desired State Configuration
PowerShell v4 Desired State Configuration
 
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...
 
10 PowerShell Mistakes, Trips and Traps
10 PowerShell Mistakes, Trips and Traps10 PowerShell Mistakes, Trips and Traps
10 PowerShell Mistakes, Trips and Traps
 
Venture Capital - An Introduction
Venture Capital - An IntroductionVenture Capital - An Introduction
Venture Capital - An Introduction
 
Tribal Nova Docker workshop
Tribal Nova Docker workshopTribal Nova Docker workshop
Tribal Nova Docker workshop
 
ABCs of docker
ABCs of dockerABCs of docker
ABCs of docker
 
Docker - Containervirtualisierung leichtgemacht
Docker - Containervirtualisierung leichtgemachtDocker - Containervirtualisierung leichtgemacht
Docker - Containervirtualisierung leichtgemacht
 
Visualising Basic Concepts of Docker
Visualising Basic Concepts of Docker Visualising Basic Concepts of Docker
Visualising Basic Concepts of Docker
 
Managing enterprise with PowerShell remoting
Managing enterprise with PowerShell remotingManaging enterprise with PowerShell remoting
Managing enterprise with PowerShell remoting
 
PowerShell crashcourse
PowerShell crashcoursePowerShell crashcourse
PowerShell crashcourse
 
Best free tools for w d a
Best free tools for w d aBest free tools for w d a
Best free tools for w d a
 
Managing SQLserver
Managing SQLserverManaging SQLserver
Managing SQLserver
 
Basic PowerShell Toolmaking - Spiceworld 2016 session
Basic PowerShell Toolmaking - Spiceworld 2016 sessionBasic PowerShell Toolmaking - Spiceworld 2016 session
Basic PowerShell Toolmaking - Spiceworld 2016 session
 
Ive got a powershell secret
Ive got a powershell secretIve got a powershell secret
Ive got a powershell secret
 
PowerShell Functions
PowerShell FunctionsPowerShell Functions
PowerShell Functions
 
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
 
Ha & drs gotcha's
Ha & drs gotcha'sHa & drs gotcha's
Ha & drs gotcha's
 
Server Core2
Server Core2Server Core2
Server Core2
 
PowerShell crashcourse for sharepoint
PowerShell crashcourse for sharepointPowerShell crashcourse for sharepoint
PowerShell crashcourse for sharepoint
 

Similaire à Introduction to Desired State Configuration (DSC)

Configuration management comes to Windows
Configuration management comes to WindowsConfiguration management comes to Windows
Configuration management comes to WindowsRavikanth Chaganti
 
Desired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc indiaDesired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc indiaRavikanth Chaganti
 
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 configurationNordic Infrastructure Conference
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaDr. John Tunnicliffe
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaDr. John Tunnicliffe
 
Tech-Spark: SQL Server on Linux
Tech-Spark: SQL Server on LinuxTech-Spark: SQL Server on Linux
Tech-Spark: SQL Server on LinuxRalph Attard
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopersBryan Cafferky
 
.NET Core: a new .NET Platform
.NET Core: a new .NET Platform.NET Core: a new .NET Platform
.NET Core: a new .NET PlatformAlex Thissen
 
Best Practice SharePoint Architecture
Best Practice SharePoint ArchitectureBest Practice SharePoint Architecture
Best Practice SharePoint ArchitectureMichael Noel
 
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...Amazon Web Services
 
ECS19 - Nik Charlebois - Automate the Deployment & Monitoring of SharePoint w...
ECS19 - Nik Charlebois - Automate the Deployment & Monitoring of SharePoint w...ECS19 - Nik Charlebois - Automate the Deployment & Monitoring of SharePoint w...
ECS19 - Nik Charlebois - Automate the Deployment & Monitoring of SharePoint w...European Collaboration Summit
 
Windows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server ManagementWindows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server ManagementSharkrit JOBBO
 
WinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSC
WinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSCWinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSC
WinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSCWinOps Conf
 
Codeigniter Training Part3
Codeigniter Training Part3Codeigniter Training Part3
Codeigniter Training Part3Weerayut Hongsa
 
Building and Managing your Virtual Datacenter using PowerShell DSC - Florin L...
Building and Managing your Virtual Datacenter using PowerShell DSC - Florin L...Building and Managing your Virtual Datacenter using PowerShell DSC - Florin L...
Building and Managing your Virtual Datacenter using PowerShell DSC - Florin L...ITCamp
 
Ex300 objectives
Ex300   objectivesEx300   objectives
Ex300 objectivesjorg_marq
 

Similaire à Introduction to Desired State Configuration (DSC) (20)

Configuration management comes to Windows
Configuration management comes to WindowsConfiguration management comes to Windows
Configuration management comes to Windows
 
Desired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc indiaDesired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc india
 
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
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
 
Cl212
Cl212Cl212
Cl212
 
Tech-Spark: SQL Server on Linux
Tech-Spark: SQL Server on LinuxTech-Spark: SQL Server on Linux
Tech-Spark: SQL Server on Linux
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopers
 
.NET Core: a new .NET Platform
.NET Core: a new .NET Platform.NET Core: a new .NET Platform
.NET Core: a new .NET Platform
 
Best Practice SharePoint Architecture
Best Practice SharePoint ArchitectureBest Practice SharePoint Architecture
Best Practice SharePoint Architecture
 
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
AWS re:Invent 2016: Deploying and Managing .NET Pipelines and Microsoft Workl...
 
ECS19 - Nik Charlebois - Automate the Deployment & Monitoring of SharePoint w...
ECS19 - Nik Charlebois - Automate the Deployment & Monitoring of SharePoint w...ECS19 - Nik Charlebois - Automate the Deployment & Monitoring of SharePoint w...
ECS19 - Nik Charlebois - Automate the Deployment & Monitoring of SharePoint w...
 
Windows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server ManagementWindows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server Management
 
eCAP Developer Walkthru
eCAP Developer WalkthrueCAP Developer Walkthru
eCAP Developer Walkthru
 
Pvs slide
Pvs slidePvs slide
Pvs slide
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
 
WinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSC
WinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSCWinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSC
WinOps Conf 2016 - Ed Wilson - Configuration Management with Azure DSC
 
Codeigniter Training Part3
Codeigniter Training Part3Codeigniter Training Part3
Codeigniter Training Part3
 
Building and Managing your Virtual Datacenter using PowerShell DSC - Florin L...
Building and Managing your Virtual Datacenter using PowerShell DSC - Florin L...Building and Managing your Virtual Datacenter using PowerShell DSC - Florin L...
Building and Managing your Virtual Datacenter using PowerShell DSC - Florin L...
 
Ex300 objectives
Ex300   objectivesEx300   objectives
Ex300 objectives
 

Dernier

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Dernier (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Introduction to Desired State Configuration (DSC)

  • 1. INTRODUCTION TO DESIRED STATE CONFIGURATION (DSC) JEFFERY HICKS, MVP JHICKS@JDHITSOLUTIONS.COM
  • 2. WHAT IS DSC? • Uses PowerShell syntax • Create configuration scripts An extension to the PowerShell language • Use PowerShell language and cmdlets to create and deploy configurations Create and manage server configuration files • A local configuration manager does the heavy lifting Ensures servers are always configured the way you need
  • 3. WHY DSC? Prevent server configuration “drift” Separate configuration from implementation “Continuous” server deployment Manage servers on-site or in a cloud Leverage your existing PowerShell skills
  • 4. REQUIREMENTS Requires Windows Management Framework 4.0 • PowerShell 4.0 • CIM DSC Namespace (RootMicrosoftWindowsDesiredStateConfiguration) • DSC cmdlets, providers and resources .NET Framework 4.5 Windows Server 2008 R2 SP1 and later Windows 7 SP1 and later
  • 5. REQUIREMENTS Verify KB2883200 for Windows 8.1 and Windows Server 2012 R2 PowerShell remoting must be enabled Optional: Public Key Infrastructure for SSL and encryption certificates
  • 6. DSC ARCHITECTURE • Configurations deployed to servers • Use Start-DSCConfiguration to deploy Push Model • Servers poll a central server • HTTP/HTTPS • SMB • Use traditional fault tolerance and load balancing Pull Model
  • 7. DSC PHASES • Can include imperative and declarative commands • Create MOF definitions Authoring Phase • Declarative MOFs staged • Configuration calculated per node Staging Phase • Declarative configurations implemented through imperative providers “Make It So” Phase
  • 8. MANAGING CONFIGURATIONS One configuration (i.e. one MOF) per server Managed by Local Configuration Manager (LCM) Think modular and plan ahead Implement the pull model to simplify management
  • 9. LOCAL CONFIGURATION MANAGER Use Get-DSCLocalConfigurationManager to check node settings • ConfigurationMode • ApplyOnly • ApplyAndMonitor • ApplyAndAutoCorrect • RefreshMode • Push • Pull • RefreshFrequencyMins (15min when using Pull) • ConfigurationModeFrequencyMins (30min) Set with a configuration
  • 10. CREATING A CONFIGURATION Defined in a PowerShell script Configuration keyword (new command type) Define Node Configure resources
  • 11. DSC RESOURCES Managed element you define in your configuration Core resources shipped “out of the box” Additional “experimental” resources shipped from Microsoft Community developed resources You can write your own
  • 12. DSC RESOURCES – OUT OF THE BOX Provider Description Archive Unpacks archive (.zip) files at specific paths on target nodes. Environment Manages system environment variables on target nodes. File Manages files and directories on target nodes. Group Manages local groups on target nodes. Log Logs configuration messages. Package Installs and manages packages, such as Windows Installer and setup.exe packages, on target nodes. Registry Manages registry keys and values on target nodes. Script Runs Windows PowerShell script blocks on target nodes. Service Manages services on target nodes. User Manages local user accounts on target nodes. Windows Feature Adds or removes Windows features and roles on target nodes. Windows Process Configures Windows processes on target nodes.
  • 13. Possible Resource settings Possible Resource values
  • 14. Configuration key word Desired config for nodes Install a Windows feature Configure a service Create a directory
  • 15. DEPLOYING A CONFIGURATION Defines a configuration called ‘ChicagoCore’ Configuration has hard code node names Configuration pushed to every defined node
  • 16. GET DSC CONFIGURATION Get last applied configuration • Gets objects for each type of resource • Use Where-Object to filter for a specific resource or setting • Use Where-Object to filter on multiple computers
  • 17. GET DSC CONFIGURATION PS C:> Get-DSCConfiguration –cimsession CHI-FP02 PS C:> (Get-DSCConfiguration –cimsession $all).where({$_.cimclass –match "service"}) | Select PSComputername, Name,StartupType,State
  • 18. TEST AND RESET A CONFIGURATION Desired state maintained by local configuration manager Test for configuration compliance Force reconfiguration Or push new configurations Pull model ensures servers have desired configuration
  • 19. TEST CONFIGURATION Test-DSCConfiguration returns True or False Recommend testing one server at a time Use –verbose to see details PS C:> Test-DSCConfiguration –cimsession CHI- FP02
  • 20. RESOURCES • The DSC Book • free ebook at http://powershell.org/wp/ebooks • PowerShell in Depth: An Administrator’s Guide 2nd Edition • http://bit.ly/PSinDepth2 • DSC Resources on GitHub • https://github.com/powershellorg/dsc • PowerShell Team blog • http://blogs.msdn.com/b/powershell/ • Pluralsight training videos • http://www.pluralsight.com
  • 21. SUMMARY DSC requires PowerShell 4.0 DSC leverages your existing PowerShell skills DSC will become the “norm” for server configuration Define a server configuration and know that it will always be that way

Notes de l'éditeur

  1. Desired State Configuration (DSC) is the last major component of the Monad Manifesto which brought us Windows PowerShell. DSC will change the way you manage your datacenter. Instead of managing a server, you will manage its configuration. DSC is known as a “make it so” technology. You will define a desired server configuration and the server will make it happen. This session will provide an overview to DSC and walk you through setting up a basic configuration.