Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Powershell DSC

You're reading from   Learning Powershell DSC Get started with the fundamentals of PowerShell DSC and utilize its power to automate deployment and configuration of your servers

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781783980703
Length 268 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
James Pogran James Pogran
Author Profile Icon James Pogran
James Pogran
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Introduction to PowerShell DSC FREE CHAPTER 2. DSC Architecture 3. DSC Configuration Files 4. DSC Resources 5. Pushing DSC Configurations 6. Pulling DSC Configurations 7. Example Scenarios Index

What makes a good DSC Resource


At this point, we've covered the structure, syntax, and how to create DSC Resources for both PowerShell v4 and v5. Even with this knowledge, it is good to step back and consider what makes up a good DSC Resource. Remember when we were covering DSC configuration scripts in the previous chapter and we spent some time on best practices for creating them? The same approach applies here.

Idempotent

It is up to you to uphold the tenants of idempotency that we have been learning over the course of this book in each DSC Resource you author. The DSC Resource is the last stop in the line of executions that determines whether the current state of the target node is the desired state we described in the DSC configuration script. You must write the code that tests and sets this state in a way that will only change the state of the target node once, the time when the system is not in the desired state.

Significant care must be taken when accomplishing this. You must not change...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image