From the course: PowerShell Desired State Configuration Essential Training

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Ordering with DependsOn

Ordering with DependsOn - PowerShell Tutorial

From the course: PowerShell Desired State Configuration Essential Training

Start my 1-month free trial

Ordering with DependsOn

- [Voiceover] So, as you start to work with configuration data and actually identify how we can work with these things, you might be wondering, well, if I'm going to copy over the bakery website to the inetpub WW root directory, like I did with my basic bakery example, what if IIS isn't installed? Or, what if that directory doesn't exist? How does DSC handle that? Well, we actually handle it with a special variable that we can call, called DependsOn and DependsOn allows us to, actually, control how things get installed. In other words, hey, if we're going to do this or, if we're going to modify and move files over into directory, we better make sure that that directory and IIS exist before we actually start copying files and if not, then we can go back in our configuration and make it happen. That way, we can help avoid errors and control the order of things of how we work inside of DSC and how configurations are actually applied to the system. So, what I want to show you in this…

Contents