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

AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...
AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...
AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...
Simplilearn
 
Linux programming lecture_notes
Linux programming lecture_notesLinux programming lecture_notes
Linux programming lecture_notes
IMRAN KHAN
 

Tendances (20)

Aws overview
Aws overviewAws overview
Aws overview
 
Virtualization.ppt
Virtualization.pptVirtualization.ppt
Virtualization.ppt
 
AWS IAM Introduction
AWS IAM IntroductionAWS IAM Introduction
AWS IAM Introduction
 
Dns
DnsDns
Dns
 
File Sever
File SeverFile Sever
File Sever
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
 
AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...
AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...
AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...
 
What is a Server
What is a ServerWhat is a Server
What is a Server
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
VMware Vsphere Graduation Project Presentation
VMware Vsphere Graduation Project PresentationVMware Vsphere Graduation Project Presentation
VMware Vsphere Graduation Project Presentation
 
AWS solution Architect Associate study material
AWS solution Architect Associate study materialAWS solution Architect Associate study material
AWS solution Architect Associate study material
 
Introduction to Hyper-V
Introduction to Hyper-VIntroduction to Hyper-V
Introduction to Hyper-V
 
Linux programming lecture_notes
Linux programming lecture_notesLinux programming lecture_notes
Linux programming lecture_notes
 
What is Virtualization
What is VirtualizationWhat is Virtualization
What is Virtualization
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
What is Virtualization and its types & Techniques.What is hypervisor and its ...
What is Virtualization and its types & Techniques.What is hypervisor and its ...What is Virtualization and its types & Techniques.What is hypervisor and its ...
What is Virtualization and its types & Techniques.What is hypervisor and its ...
 
Xen Hypervisor
Xen HypervisorXen Hypervisor
Xen Hypervisor
 
Ansible
AnsibleAnsible
Ansible
 
Linux Advantages and Disadvantages
Linux Advantages and DisadvantagesLinux Advantages and Disadvantages
Linux Advantages and Disadvantages
 

En vedette

Managing enterprise with PowerShell remoting
Managing enterprise with PowerShell remotingManaging enterprise with PowerShell remoting
Managing enterprise with PowerShell remoting
Concentrated Technology
 
Ive got a powershell secret
Ive got a powershell secretIve got a powershell secret
Ive got a powershell secret
Chris Conte
 

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)

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
Ravikanth 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 configuration
Nordic Infrastructure Conference
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopers
Bryan Cafferky
 
Ex300 objectives
Ex300   objectivesEx300   objectives
Ex300 objectives
jorg_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

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

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.