From 26275903b29177503c8c538a02e2452470282846 Mon Sep 17 00:00:00 2001 From: Deepak Singh Dhami Date: Tue, 14 Nov 2017 12:10:29 +0530 Subject: [PATCH] Updates configurations.md Two set of changes made. - Example scripts e.g. MyDscConfiguration.ps1 define the configuration inside them and call the configuration at the end line. Removed the call to the configuration at the end. Since the article demonstrates dot-sourcing the file and calling the configuration explicitly. - Fixed typo in the file name (TEST-PC1.mof to localhost.mof ), since the ComputerName was not specified it should default to using 'localhost' as the default argument for it. P.S. - There is a comment on the web-page regarding the fixes made --- dsc/configurations.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dsc/configurations.md b/dsc/configurations.md index 814b9e0011a5..e6bc1148b6a2 100644 --- a/dsc/configurations.md +++ b/dsc/configurations.md @@ -28,7 +28,6 @@ Configuration MyDscConfiguration { } } -MyDscConfiguration ``` Save the script as a .ps1 file. @@ -62,7 +61,6 @@ Configuration MyDscConfiguration { } } -MyDscConfiguration ``` In this example, you specify the name of the node by passing it as the **ComputerName** parameter when you compile the configuraton. The name defaults to "localhost". @@ -99,7 +97,7 @@ MyDscConfiguration Directory: C:\users\default\Documents\DSC Configurations\MyDscConfiguration Mode LastWriteTime Length Name ---- ------------- ------ ---- --a---- 10/23/2015 4:32 PM 2842 TEST-PC1.mof +-a---- 10/23/2015 4:32 PM 2842 localhost.mof ``` If the configuration takes a parameter, as in the second example, that has to be provided at compile time. Here's how that would look: @@ -140,7 +138,6 @@ Configuration DependsOnExample { } } -DependsOnExample ``` ## Using new resources in Your configuration