Jump to content

Help with Powershell DSC

KraftDinner

Can I get some clarification on Powershell DSC? What is it used for and why would someone use it? I mean I get that it is a way for you to modify servers into working a specific way by removing / adding roles etc, but that cant be it can it? 

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, KraftDinner said:

Can I get some clarification on Powershell DSC? What is it used for and why would someone use it? I mean I get that it is a way for you to modify servers into working a specific way by removing / adding roles etc, but that cant be it can it? 

Desired State configuration.

 

Lets say you have a IIS role installed and running on server 1.

Lets say it is working fine.

Lets say intern comes in and fucks everything.

DSC says "hmmm, sysadmin wanted me to make sure I have IIS installed, and had the following sites published, and the files can be found over there *points to SAN\Cluster*"

Server restores server to operational state, and is now publishing said site.

 

Other things include making sure files, registy keys, (etc) exist or are absent.

 

See more then just installing roles. you can do a lot more, but that is basically it (and by basically i mean basic). Here is a cheatsheet http://blogs.technet.com/b/stefan_stranger/archive/2013/08/26/powershell-v4-desired-state-configuration-cheat-sheet.aspx

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Blake said:

Desired State configuration.

 

Lets say you have a IIS role installed and running on server 1.

Lets say it is working fine.

Lets say intern comes in and fucks everything.

DSC says "hmmm, sysadmin wanted me to make sure I have IIS installed, and had the following sites published, and the files can be found over there *points to SAN\Cluster*"

Server restores server to operational state, and is now publishing said site.

 

Other things include making sure files, registy keys, (etc) exist or are absent.

 

See more then just installing roles. you can do a lot more, but that is basically it (and by basically i mean basic). Here is a cheatsheet http://blogs.technet.com/b/stefan_stranger/archive/2013/08/26/powershell-v4-desired-state-configuration-cheat-sheet.aspx

Great explanation, so I can make a custom configuration and tell it to check the nodes every *blank* minutes for changes, if changes are detected it will go back to the desired configuration? I also read that there are 2 ways of deploying DSC, either push or pull so I'm assuming you can have a central server with your desired configuration and the nodes can pull this configuration from that central server every so often

Link to comment
Share on other sites

Link to post
Share on other sites

On 2/12/2016 at 6:26 PM, KraftDinner said:

Great explanation, so I can make a custom configuration and tell it to check the nodes every *blank* minutes for changes, if changes are detected it will go back to the desired configuration? I also read that there are 2 ways of deploying DSC, either push or pull so I'm assuming you can have a central server with your desired configuration and the nodes can pull this configuration from that central server every so often

correct. You can have the server do the checking or any external system check the configuration (doesn't require centralization), hence pull and push. With pull it is automated to check every x mins. With push you'd need to setup a script to push it every x mins.

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Blake said:

correct. You can have the server do the checking or any external system check the configuration (doesn't require centralization), hence pull and push. With pull it is automated to check every x mins. With push you'd need to setup a script to push it every x mins.

Thanks a lot, this really clarified things

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×