diff --git a/DSCPullServerSetup/README.md b/DSCPullServerSetup/README.md
index ac029c766..a74fe1498 100644
--- a/DSCPullServerSetup/README.md
+++ b/DSCPullServerSetup/README.md
@@ -1,53 +1,53 @@
-# DSCPullServer
-
-The DSCPullServerSetup module contains utilities to automate DSC module and configuration document packaging and deployment on an enterprise DSC Pull Server, with examples.
-
-# Publish-DSCModuleAndMof cmdlet
-
-Use `Publish-DSCModuleAndMof` cmdlet to package a module containing DSC Resources that are present in `$Source` or in `$ModuleNameList` into zip files with version info, then publish them with MOF configuration documents that are present in `$Source` to the Pull server.
-
-- This publishes all the DSC Resources in `$env:ProgramFiles\WindowsPowerShell\DscService\Modules`
-- This publishes all the MOF configuration documents in `$env:ProgramFiles\WindowsPowerShell\DscService\Configuration`
-- Use `-Force` to force packaging the version that exists in $Source folder if a different version of the module exists in the PowerShell module path
-- Use `-ModuleNameList` to specify the names of the modules to be published (all versions if multiple versions of the module are installed) if no DSC module present in local folder `$Source`
-
-```
-.EXAMPLE
- Publish-DSCModuleAndMof -Source C:\LocalDepot
-
-.EXAMPLE
- $moduleList = @("xWebAdministration", "xPhp")
- Publish-DSCModuleAndMof -Source C:\LocalDepot -ModuleNameList $moduleList
-
-.EXAMPLE
- Publish-DSCModuleAndMof -Source C:\LocalDepot -Force
-```
-
-# How to Configure Pull Server & SQL Server to enable new SQL backend provider feature in DSC
-
-- Install SQL Server on a clean OS
-- On the SQL Server Machine:
- - Create a Firewall rule according to this link : https://technet.microsoft.com/en-us/library/ms175043(v=sql.110).aspx
- - Enable TCP/IP :
- - Open "SQL Server Configuration Manager"
- - Now Click on "SQL Server Network Configuration" and Click on "Protocols for Name"
- - Right Click on "TCP/IP" (make sure it is Enabled) Click on Properties
- - Now Select "IP Addresses" Tab -and- Go to the last entry "IP All"
- - Enter "TCP Port" 1433.
- - Now Restart "SQL Server .Name." using "services.msc" (winKey + r)
- - Enable Remote Connections to the SQL Server
- - Go to Server Properties
- - Select Connections
- - Under the Remote server connections - Click the check box next to "Allow remote connections to this server"
- - Create a new User login (This is required as the engine will need this privilege to create the DSC DB and tables)
- - Go to the Login Properties
- - Select Server Roles - select "Public" and "Sysadmin"
- - Select User Mapping - select "db_owner" and "public"
- - On the Pull Server
- - Update the Web.Config with the SQL server connection string
- - Open : C:\inetpub\wwwroot\PSDSCPullServer\Web.config
- - <add key="dbprovider" value="System.Data.OleDb"/>
- - <add key="dbconnectionstr" value="Provider=SQLNCLI11;Data Source=<ServerName>;Initial Catalog=master;User ID=sa;Password=<sapassword>;Initial Catalog=master;"/>
- - If SQL server was installed as a named Instance instead of default one then use
- - <add key="dbconnectionstr" value="Provider=SQLNCLI11;Data Source=<ServerName\InstanceName>;Initial Catalog=master;User ID=sa;Password=<sapassword>;Initial Catalog=master;"/>
- - Run iireset for the Pull server to pick up the new configuration.
+# DSCPullServer
+
+The DSCPullServerSetup module contains utilities to automate DSC module and configuration document packaging and deployment on an enterprise DSC Pull Server, with examples.
+
+# Publish-DSCModuleAndMof cmdlet
+
+Use `Publish-DSCModuleAndMof` cmdlet to package a module containing DSC Resources that are present in `$Source` or in `$ModuleNameList` into zip files with version info, then publish them with MOF configuration documents that are present in `$Source` to the Pull server.
+
+- This publishes all the DSC Resources in `$env:ProgramFiles\WindowsPowerShell\DscService\Modules`
+- This publishes all the MOF configuration documents in `$env:ProgramFiles\WindowsPowerShell\DscService\Configuration`
+- Use `-Force` to force packaging the version that exists in $Source folder if a different version of the module exists in the PowerShell module path
+- Use `-ModuleNameList` to specify the names of the modules to be published (all versions if multiple versions of the module are installed) if no DSC module present in local folder `$Source`
+
+```
+.EXAMPLE
+ Publish-DSCModuleAndMof -Source C:\LocalDepot
+
+.EXAMPLE
+ $moduleList = @("xWebAdministration", "xPhp")
+ Publish-DSCModuleAndMof -Source C:\LocalDepot -ModuleNameList $moduleList
+
+.EXAMPLE
+ Publish-DSCModuleAndMof -Source C:\LocalDepot -Force
+```
+
+# How to Configure Pull Server & SQL Server to enable new SQL backend provider feature in DSC
+
+- Install SQL Server on a clean OS
+- On the SQL Server Machine:
+ - Create a Firewall rule according to this link : https://technet.microsoft.com/en-us/library/ms175043(v=sql.110).aspx
+ - Enable TCP/IP :
+ - Open "SQL Server Configuration Manager"
+ - Now Click on "SQL Server Network Configuration" and Click on "Protocols for Name"
+ - Right Click on "TCP/IP" (make sure it is Enabled) Click on Properties
+ - Now Select "IP Addresses" Tab -and- Go to the last entry "IP All"
+ - Enter "TCP Port" 1433.
+ - Now Restart "SQL Server .Name." using "services.msc" (winKey + r)
+ - Enable Remote Connections to the SQL Server
+ - Go to Server Properties
+ - Select Connections
+ - Under the Remote server connections - Click the check box next to "Allow remote connections to this server"
+ - Create a new User login (This is required as the engine will need this privilege to create the DSC DB and tables)
+ - Go to the Login Properties
+ - Select Server Roles - select "Public" and "Sysadmin"
+ - Select User Mapping - select "db_owner" and "public"
+ - On the Pull Server
+ - Update the Web.Config with the SQL server connection string
+ - Open : C:\inetpub\wwwroot\PSDSCPullServer\Web.config
+ - <add key="dbprovider" value="System.Data.OleDb"/>
+ - <add key="dbconnectionstr" value="Provider=SQLNCLI11;Data Source=<ServerName>;Initial Catalog=master;User ID=sa;Password=<sapassword>;Initial Catalog=master;"/>
+ - If SQL server was installed as a named Instance instead of default one then use
+ - <add key="dbconnectionstr" value="Provider=SQLNCLI11;Data Source=<ServerName\InstanceName>;Initial Catalog=master;User ID=sa;Password=<sapassword>;Initial Catalog=master;"/>
+ - Run iireset for the Pull server to pick up the new configuration.
diff --git a/DSCResources/MSFT_xArchive/MSFT_xArchive.schema.mof b/DSCResources/MSFT_xArchive/MSFT_xArchive.schema.mof
index 1acddc307..43d34920f 100644
--- a/DSCResources/MSFT_xArchive/MSFT_xArchive.schema.mof
+++ b/DSCResources/MSFT_xArchive/MSFT_xArchive.schema.mof
@@ -1,11 +1,11 @@
-[ClassVersion("1.0.0.0"),FriendlyName("xArchive")]
-class MSFT_xArchive : OMI_BaseResource
-{
- [Key, Description("The path to the archive file that should be expanded to or removed from the specified destination.")] String Path;
- [Key, Description("The path where the specified archive file should be expanded to or removed from.")] String Destination;
- [Write, Description("Specifies whether or not the expanded content of the archive file at the specified path should exist at the specified destination. To update the specified destination to have the expanded content of the archive file at the specified path, specify this property as Present. To remove the expanded content of the archive file at the specified path from the specified destination, specify this property as Absent. The default value is Present."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure;
- [Write, Description("Specifies whether or not to validate that a file at the destination with the same name as a file in the archive actually matches that corresponding file in the archive by the specified checksum method. If the file does not match and Ensure is specified as Present and Force is not specified, the resource will throw an error that the file at the desintation cannot be overwritten. If the file does not match and Ensure is specified as Present and Force is specified, the file at the desintation will be overwritten. If the file does not match and Ensure is specified as Absent, the file at the desintation will not be removed. The default value is false.")] Boolean Validate;
- [Write, Description("The Checksum method to use to validate whether or not a file at the destination with the same name as a file in the archive actually matches that corresponding file in the archive. An invalid argument exception will be thrown if Checksum is specified while Validate is specified as false. ModifiedDate will check that the LastWriteTime property of the file at the destination matches the LastWriteTime property of the file in the archive. CreatedDate will check that the CreationTime property of the file at the destination matches the CreationTime property of the file in the archive. SHA-1, SHA-256, and SHA-512 will check that the hash of the file at the destination by the specified SHA method matches the hash of the file in the archive by the specified SHA method. The default value is ModifiedDate.") ,ValueMap{"SHA-1", "SHA-256", "SHA-512", "CreatedDate", "ModifiedDate"}, Values{"SHA-1", "SHA-256", "SHA-512", "CreatedDate", "ModifiedDate"}] String Checksum;
- [Write, Description("The credential of a user account with permissions to access the specified archive path and destination if needed.") ,EmbeddedInstance("MSFT_Credential")] String Credential;
- [Write, Description("Specifies whether or not any existing files or directories at the destination with the same name as a file or directory in the archive should be overwritten to match the file or directory in the archive. When this property is false, an error will be thrown if an item at the destination needs to be overwritten. The default value is false.")] Boolean Force;
-};
+[ClassVersion("1.0.0.0"),FriendlyName("xArchive")]
+class MSFT_xArchive : OMI_BaseResource
+{
+ [Key, Description("The path to the archive file that should be expanded to or removed from the specified destination.")] String Path;
+ [Key, Description("The path where the specified archive file should be expanded to or removed from.")] String Destination;
+ [Write, Description("Specifies whether or not the expanded content of the archive file at the specified path should exist at the specified destination. To update the specified destination to have the expanded content of the archive file at the specified path, specify this property as Present. To remove the expanded content of the archive file at the specified path from the specified destination, specify this property as Absent. The default value is Present."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure;
+ [Write, Description("Specifies whether or not to validate that a file at the destination with the same name as a file in the archive actually matches that corresponding file in the archive by the specified checksum method. If the file does not match and Ensure is specified as Present and Force is not specified, the resource will throw an error that the file at the desintation cannot be overwritten. If the file does not match and Ensure is specified as Present and Force is specified, the file at the desintation will be overwritten. If the file does not match and Ensure is specified as Absent, the file at the desintation will not be removed. The default value is false.")] Boolean Validate;
+ [Write, Description("The Checksum method to use to validate whether or not a file at the destination with the same name as a file in the archive actually matches that corresponding file in the archive. An invalid argument exception will be thrown if Checksum is specified while Validate is specified as false. ModifiedDate will check that the LastWriteTime property of the file at the destination matches the LastWriteTime property of the file in the archive. CreatedDate will check that the CreationTime property of the file at the destination matches the CreationTime property of the file in the archive. SHA-1, SHA-256, and SHA-512 will check that the hash of the file at the destination by the specified SHA method matches the hash of the file in the archive by the specified SHA method. The default value is ModifiedDate.") ,ValueMap{"SHA-1", "SHA-256", "SHA-512", "CreatedDate", "ModifiedDate"}, Values{"SHA-1", "SHA-256", "SHA-512", "CreatedDate", "ModifiedDate"}] String Checksum;
+ [Write, Description("The credential of a user account with permissions to access the specified archive path and destination if needed.") ,EmbeddedInstance("MSFT_Credential")] String Credential;
+ [Write, Description("Specifies whether or not any existing files or directories at the destination with the same name as a file or directory in the archive should be overwritten to match the file or directory in the archive. When this property is false, an error will be thrown if an item at the destination needs to be overwritten. The default value is false.")] Boolean Force;
+};
diff --git a/DSCResources/MSFT_xDSCWebService/PSWSIISEndpoint.psm1 b/DSCResources/MSFT_xDSCWebService/PSWSIISEndpoint.psm1
index 90f31578a..ca5a44ce8 100644
--- a/DSCResources/MSFT_xDSCWebService/PSWSIISEndpoint.psm1
+++ b/DSCResources/MSFT_xDSCWebService/PSWSIISEndpoint.psm1
@@ -1,715 +1,715 @@
-# This module file contains a utility to perform PSWS IIS Endpoint setup
-# Module exports New-PSWSEndpoint function to perform the endpoint setup
-#
-#Copyright (c) Microsoft Corporation, 2014
-#
-
-# name and description for the Firewall rules. Used in multiple locations
-$FireWallRuleDisplayName = "Desired State Configuration - Pull Server Port:{0}"
-$FireWallRuleDescription = "Inbound traffic for IIS site on Port:{0} for DSC pull server. Created by DSCWebService resource"
-
-# Validate supplied configuration to setup the PSWS Endpoint
-# Function checks for the existence of PSWS Schema files, IIS config
-# Also validate presence of IIS on the target machine
-#
-function Initialize-Endpoint
-{
- param (
- $site,
- $path,
- $cfgfile,
- $port,
- $app,
- $applicationPoolIdentityType,
- $svc,
- $mof,
- $dispatch,
- $asax,
- $dependentBinaries,
- $language,
- $dependentMUIFiles,
- $psFiles,
- $removeSiteFiles = $false,
- $certificateThumbPrint,
- $enable32BitAppOnWin64)
-
- if (!(Test-Path $cfgfile))
- {
- throw "ERROR: $cfgfile does not exist"
- }
-
- if (!(Test-Path $svc))
- {
- throw "ERROR: $svc does not exist"
- }
-
- if (!(Test-Path $mof))
- {
- throw "ERROR: $mof does not exist"
- }
-
- if (!(Test-Path $asax))
- {
- throw "ERROR: $asax does not exist"
- }
-
- if ($certificateThumbPrint -ne "AllowUnencryptedTraffic")
- {
- Write-Verbose "Verify that the certificate with the provided thumbprint exists in CERT:\LocalMachine\MY\"
- $certificate = Get-childItem CERT:\LocalMachine\MY\ | Where {$_.Thumbprint -eq $certificateThumbPrint}
- if (!$Certificate)
- {
- throw "ERROR: Certificate with thumbprint $certificateThumbPrint does not exist in CERT:\LocalMachine\MY\"
- }
- }
-
- Test-IISInstall
-
- $appPool = "PSWS"
-
-
- Write-Verbose "Delete the App Pool if it exists"
- Remove-AppPool -apppool $appPool
-
- Write-Verbose "Remove the site if it already exists"
- Update-Site -siteName $site -siteAction Remove
-
- # check for existing binding, there should be no binding with the same port
- if ((Get-WebBinding | where bindingInformation -eq "*:$($port):").count -gt 0)
- {
- throw "ERROR: Port $port is already used, please review existing sites and change the port to be used."
- }
-
- if ($removeSiteFiles)
- {
- if(Test-Path $path)
- {
- Remove-Item -Path $path -Recurse -Force
- }
- }
-
- Copy-Files -path $path -cfgfile $cfgfile -svc $svc -mof $mof -dispatch $dispatch -asax $asax -dependentBinaries $dependentBinaries -language $language -dependentMUIFiles $dependentMUIFiles -psFiles $psFiles
-
- New-IISWebSite -site $site -path $path -port $port -app $app -apppool $appPool -applicationPoolIdentityType $applicationPoolIdentityType -certificateThumbPrint $certificateThumbPrint -enable32BitAppOnWin64 $enable32BitAppOnWin64
-}
-
-# Validate if IIS and all required dependencies are installed on the target machine
-#
-function Test-IISInstall
-{
- Write-Verbose "Checking IIS requirements"
- $iisVersion = (Get-ItemProperty HKLM:\SOFTWARE\Microsoft\InetStp -ErrorAction silentlycontinue).MajorVersion
-
- if ($iisVersion -lt 7)
- {
- throw "ERROR: IIS Version detected is $iisVersion , must be running higher than 7.0"
- }
-
- $wsRegKey = (Get-ItemProperty hklm:\SYSTEM\CurrentControlSet\Services\W3SVC -ErrorAction silentlycontinue).ImagePath
- if ($wsRegKey -eq $null)
- {
- throw "ERROR: Cannot retrive W3SVC key. IIS Web Services may not be installed"
- }
-
- if ((Get-Service w3svc).Status -ne "running")
- {
- throw "ERROR: service W3SVC is not running"
- }
-}
-
-# Verify if a given IIS Site exists
-#
-function Test-IISSiteExists
-{
- param ($siteName)
-
- if (Get-Website -Name $siteName)
- {
- return $true
- }
-
- return $false
-}
-
-# Perform an action (such as stop, start, delete) for a given IIS Site
-#
-function Update-Site
-{
- param (
- [Parameter(ParameterSetName = 'SiteName', Mandatory, Position = 0)]
- [ValidateNotNullOrEmpty()]
- [String]$siteName,
-
- [Parameter(ParameterSetName = 'Site', Mandatory, Position = 0)]
- $site,
-
- [Parameter(ParameterSetName = 'SiteName', Mandatory, Position = 1)]
- [Parameter(ParameterSetName = 'Site', Mandatory, Position = 1)]
- [String]$siteAction)
-
- [String]$name = $null
- if ($PSCmdlet.ParameterSetName -eq 'SiteName')
- {
- $name = $siteName
- }
- elseif ($PSCmdlet.ParameterSetName -eq 'Site')
- {
- $name = $site.Name
- }
-
- if (Test-IISSiteExists -siteName $name)
- {
- switch ($siteAction)
- {
- "Start" {Start-Website -Name "$name"}
- "Stop" {Stop-Website -Name "$name" -ErrorAction SilentlyContinue}
- "Remove" {Remove-Website -Name "$name"}
- }
- Write-Verbose "p11"
- }
-}
-
-# Delete the given IIS Application Pool
-# This is required to cleanup any existing conflicting apppools before setting up the endpoint
-#
-function Remove-AppPool
-{
- param ($appPool)
-
- # without this tests we may get a breaking error here, despite SilentlyContinue
- if (Test-Path "IIS:\AppPools\$appPool")
- {
- Remove-WebAppPool -Name $appPool -ErrorAction SilentlyContinue
- }
-}
-
-# Generate an IIS Site Id while setting up the endpoint
-# The Site Id will be the max available in IIS config + 1
-#
-function New-SiteID
-{
- return ((Get-Website | % { $_.Id } | Measure-Object -Maximum).Maximum + 1)
-}
-
-# Validate the PSWS config files supplied and copy to the IIS endpoint in inetpub
-#
-function Copy-Files
-{
- param (
- $path,
- $cfgfile,
- $svc,
- $mof,
- $dispatch,
- $asax,
- $dependentBinaries,
- $language,
- $dependentMUIFiles,
- $psFiles)
-
- if (!(Test-Path $cfgfile))
- {
- throw "ERROR: $cfgfile does not exist"
- }
-
- if (!(Test-Path $svc))
- {
- throw "ERROR: $svc does not exist"
- }
-
- if (!(Test-Path $mof))
- {
- throw "ERROR: $mof does not exist"
- }
-
- if (!(Test-Path $asax))
- {
- throw "ERROR: $asax does not exist"
- }
-
- if (!(Test-Path $path))
- {
- $null = New-Item -ItemType container -Path $path
- }
-
- foreach ($dependentBinary in $dependentBinaries)
- {
- if (!(Test-Path $dependentBinary))
- {
- throw "ERROR: $dependentBinary does not exist"
- }
- }
-
- <#foreach ($dependentMUIFile in $dependentMUIFiles)
- {
- if (!(Test-Path $dependentMUIFile))
- {
- throw "ERROR: $dependentMUIFile does not exist"
- }
- }#>
-
- Write-Verbose "Create the bin folder for deploying custom dependent binaries required by the endpoint"
- $binFolderPath = Join-Path $path "bin"
- $null = New-Item -path $binFolderPath -itemType "directory" -Force
- Copy-Item $dependentBinaries $binFolderPath -Force
-
- <#if ($language)
- {
- $muiPath = Join-Path $binFolderPath $language
-
- if (!(Test-Path $muiPath))
- {
- $null = New-Item -ItemType container $muiPath
- }
- Copy-Item $dependentMUIFiles $muiPath -Force
- }#>
-
- foreach ($psFile in $psFiles)
- {
- if (!(Test-Path $psFile))
- {
- throw "ERROR: $psFile does not exist"
- }
-
- Copy-Item $psFile $path -Force
- }
-
- Copy-Item $cfgfile (Join-Path $path "web.config") -Force
- Copy-Item $svc $path -Force
- Copy-Item $mof $path -Force
-
- if ($dispatch)
- {
- Copy-Item $dispatch $path -Force
- }
-
- if ($asax)
- {
- Copy-Item $asax $path -Force
- }
-}
-
-# Setup IIS Apppool, Site and Application
-#
-function New-IISWebSite
-{
- param (
- $site,
- $path,
- $port,
- $app,
- $appPool,
- $applicationPoolIdentityType,
- $certificateThumbPrint,
- $enable32BitAppOnWin64)
-
- $siteID = New-SiteID
-
- Write-Verbose "Adding App Pool"
- $null = New-WebAppPool -Name $appPool
-
- Write-Verbose "Set App Pool Properties"
- $appPoolIdentity = 4
- if ($applicationPoolIdentityType)
- {
- # LocalSystem = 0, LocalService = 1, NetworkService = 2, SpecificUser = 3, ApplicationPoolIdentity = 4
- if ($applicationPoolIdentityType -eq "LocalSystem")
- {
- $appPoolIdentity = 0
- }
- elseif ($applicationPoolIdentityType -eq "LocalService")
- {
- $appPoolIdentity = 1
- }
- elseif ($applicationPoolIdentityType -eq "NetworkService")
- {
- $appPoolIdentity = 2
- }
- }
-
- $appPoolItem = Get-Item IIS:\AppPools\$appPool
- $appPoolItem.managedRuntimeVersion = "v4.0"
- $appPoolItem.enable32BitAppOnWin64 = $enable32BitAppOnWin64
- $appPoolItem.processModel.identityType = $appPoolIdentity
- $appPoolItem | Set-Item
-
- Write-Verbose "Add and Set Site Properties"
- if ($certificateThumbPrint -eq "AllowUnencryptedTraffic")
- {
- $webSite = New-WebSite -Name $site -Id $siteID -Port $port -IPAddress "*" -PhysicalPath $path -ApplicationPool $appPool
- }
- else
- {
- $webSite = New-WebSite -Name $site -Id $siteID -Port $port -IPAddress "*" -PhysicalPath $path -ApplicationPool $appPool -Ssl
-
- # Remove existing binding for $port
- Remove-Item IIS:\SSLBindings\0.0.0.0!$port -ErrorAction Ignore
-
- # Create a new binding using the supplied certificate
- $null = Get-Item CERT:\LocalMachine\MY\$certificateThumbPrint | New-Item IIS:\SSLBindings\0.0.0.0!$port
- }
-
- Update-Site -siteName $site -siteAction Start
-}
-
-# Allow Clients outsite the machine to access the setup endpoint on a User Port
-#
-function New-FirewallRule
-{
- param ($firewallPort)
-
- $script:netsh = "$env:windir\system32\netsh.exe"
-
- Write-Verbose "Disable Inbound Firewall Notification"
- & $script:netsh advfirewall set currentprofile settings inboundusernotification disable
-
- # remove all existing rules with that displayName
- & $script:netsh advfirewall firewall delete rule name=DSCPullServer_IIS_Port protocol=tcp localport=$firewallPort | Out-Null
-
- Write-Verbose "Add Firewall Rule for port $firewallPort"
- & $script:netsh advfirewall firewall add rule name=DSCPullServer_IIS_Port dir=in action=allow protocol=TCP localport=$firewallPort
-}
-
-# Enable & Clear PSWS Operational/Analytic/Debug ETW Channels
-#
-function Enable-PSWSETW
-{
- # Disable Analytic Log
- & $script:wevtutil sl Microsoft-Windows-ManagementOdataService/Analytic /e:false /q | Out-Null
-
- # Disable Debug Log
- & $script:wevtutil sl Microsoft-Windows-ManagementOdataService/Debug /e:false /q | Out-Null
-
- # Clear Operational Log
- & $script:wevtutil cl Microsoft-Windows-ManagementOdataService/Operational | Out-Null
-
- # Enable/Clear Analytic Log
- & $script:wevtutil sl Microsoft-Windows-ManagementOdataService/Analytic /e:true /q | Out-Null
-
- # Enable/Clear Debug Log
- & $script:wevtutil sl Microsoft-Windows-ManagementOdataService/Debug /e:true /q | Out-Null
-}
-
-<#
-.Synopsis
- Create PowerShell WebServices IIS Endpoint
-.DESCRIPTION
- Creates a PSWS IIS Endpoint by consuming PSWS Schema and related dependent files
-.EXAMPLE
- New a PSWS Endpoint [@ http://Server:39689/PSWS_Win32Process] by consuming PSWS Schema Files and any dependent scripts/binaries
- New-PSWSEndpoint -site Win32Process -path $env:SystemDrive\inetpub\PSWS_Win32Process -cfgfile Win32Process.config -port 39689 -app Win32Process -svc PSWS.svc -mof Win32Process.mof -dispatch Win32Process.xml -dependentBinaries ConfigureProcess.ps1, Rbac.dll -psFiles Win32Process.psm1
-#>
-function New-PSWSEndpoint
-{
-[CmdletBinding()]
- param (
-
- # Unique Name of the IIS Site
- [String] $site = "PSWS",
-
- # Physical path for the IIS Endpoint on the machine (under inetpub)
- [String] $path = "$env:SystemDrive\inetpub\PSWS",
-
- # Web.config file
- [String] $cfgfile = "web.config",
-
- # Port # for the IIS Endpoint
- [Int] $port = 8080,
-
- # IIS Application Name for the Site
- [String] $app = "PSWS",
-
- # IIS App Pool Identity Type - must be one of LocalService, LocalSystem, NetworkService, ApplicationPoolIdentity
- [ValidateSet('LocalService', 'LocalSystem', 'NetworkService', 'ApplicationPoolIdentity')]
- [String] $applicationPoolIdentityType,
-
- # WCF Service SVC file
- [String] $svc = "PSWS.svc",
-
- # PSWS Specific MOF Schema File
- [parameter(Mandatory)]
- [ValidateNotNullOrEmpty()]
- [String] $mof,
-
- # PSWS Specific Dispatch Mapping File [Optional]
- [ValidateNotNullOrEmpty()]
- [String] $dispatch,
-
- # Global.asax file [Optional]
- [ValidateNotNullOrEmpty()]
- [String] $asax,
-
- # Any dependent binaries that need to be deployed to the IIS endpoint, in the bin folder
- [ValidateNotNullOrEmpty()]
- [String[]] $dependentBinaries,
-
- # MUI Language [Optional]
- [ValidateNotNullOrEmpty()]
- [String] $language,
-
- # Any dependent binaries that need to be deployed to the IIS endpoint, in the bin\mui folder [Optional]
- [ValidateNotNullOrEmpty()]
- [String[]] $dependentMUIFiles,
-
- # Any dependent PowerShell Scipts/Modules that need to be deployed to the IIS endpoint application root
- [ValidateNotNullOrEmpty()]
- [String[]] $psFiles,
-
- # True to remove all files for the site at first, false otherwise
- [Boolean]$removeSiteFiles = $false,
-
- # Enable Firewall Exception for the supplied port
- [Boolean] $EnableFirewallException,
-
- # Enable and Clear PSWS ETW
- [switch] $EnablePSWSETW,
-
- # Thumbprint of the Certificate in CERT:\LocalMachine\MY\ for Pull Server
- [String] $certificateThumbPrint = "AllowUnencryptedTraffic",
-
- # When this property is set to true, Pull Server will run on a 32 bit process on a 64 bit machine
- [boolean]$Enable32BitAppOnWin64 = $false)
-
- $script:wevtutil = "$env:windir\system32\Wevtutil.exe"
-
- $svcName = Split-Path $svc -Leaf
- $protocol = "https:"
- if ($certificateThumbPrint -eq "AllowUnencryptedTraffic")
- {
- $protocol = "http:"
- }
-
- # Get Machine Name
- $cimInstance = Get-CimInstance -ClassName Win32_ComputerSystem -Verbose:$false
-
- Write-Verbose ("Setting up endpoint at - $protocol//" + $cimInstance.Name + ":" + $port + "/" + $svcName)
- Initialize-Endpoint -site $site -path $path -cfgfile $cfgfile -port $port -app $app `
- -applicationPoolIdentityType $applicationPoolIdentityType -svc $svc -mof $mof `
- -dispatch $dispatch -asax $asax -dependentBinaries $dependentBinaries `
- -language $language -dependentMUIFiles $dependentMUIFiles -psFiles $psFiles `
- -removeSiteFiles $removeSiteFiles -certificateThumbPrint $certificateThumbPrint `
- -enable32BitAppOnWin64 $Enable32BitAppOnWin64
-
- if ($EnableFirewallException -eq $true)
- {
- Write-Verbose "Enabling firewall exception for port $port"
- $null = New-FirewallRule $port
- }
-
- if ($EnablePSWSETW)
- {
- Enable-PSWSETW
- }
-}
-
-<#
-.Synopsis
- Removes a DSC WebServices IIS Endpoint
-.DESCRIPTION
- Removes a PSWS IIS Endpoint
-.EXAMPLE
- Remove the endpoint with the specified name
- Remove-PSWSEndpoint -siteName PSDSCPullServer
-#>
-function Remove-PSWSEndpoint
-{
-[CmdletBinding()]
- param (
- # Unique Name of the IIS Site
- [String] $siteName
- )
-
- # get the site to remove
- $site = Get-Item -Path "IIS:\sites\$siteName"
- # and the pool it is using
- $pool = $site.applicationPool
-
- # get the path so we can delete the files
- $filePath = $site.PhysicalPath
- # get the port number for the Firewall rule
- $bindings = (Get-WebBinding -Name $siteName).bindingInformation
- $port = [regex]::match($bindings,':(\d+):').Groups[1].Value
-
- # remove the actual site.
- Remove-Website -Name $siteName
- # there may be running requests, wait a little
- # I had an issue where the files were still in use
- # when I tried to delete them
- Start-Sleep -Milliseconds 200
-
- # remove the files for the site
- If (Test-Path $filePath)
- {
- Get-ChildItem $filePath -Recurse | Remove-Item -Recurse
- Remove-Item $filePath
- }
-
- # find out whether any other site is using this pool
- $filter = "/system.applicationHost/sites/site/application[@applicationPool='" + $pool + "']"
- $apps = (Get-WebConfigurationProperty -Filter $filter -PSPath "machine/webroot/apphost" -name path).ItemXPath
- if (-not $apps -or $apps.count -eq 1)
- {
- # if we are the only site in the pool, remove the pool as well.
- Remove-WebAppPool -Name $pool
- }
-
-
- # remove all rules with that name
- $ruleName = ($($FireWallRuleDisplayName) -f $port)
- Get-NetFirewallRule | Where-Object DisplayName -eq "$ruleName" | Remove-NetFirewallRule
-
-}
-
-<#
-.Synopsis
- Set the option into the web.config for an endpoint
-.DESCRIPTION
- Set the options into the web.config for an endpoint allowing customization.
-.EXAMPLE
-#>
-function Set-AppSettingsInWebconfig
-{
- param (
-
- # Physical path for the IIS Endpoint on the machine (possibly under inetpub)
- [parameter(Mandatory)]
- [ValidateNotNullOrEmpty()]
- [String] $path,
-
- # Key to add/update
- [parameter(Mandatory)]
- [ValidateNotNullOrEmpty()]
- [String] $key,
-
- # Value
- [parameter(Mandatory)]
- [ValidateNotNullOrEmpty()]
- [String] $value
-
- )
-
- $webconfig = Join-Path $path "web.config"
- [bool] $Found = $false
-
- if (Test-Path $webconfig)
- {
- $xml = [xml](get-content $webconfig)
- $root = $xml.get_DocumentElement()
-
- foreach( $item in $root.appSettings.add)
- {
- if( $item.key -eq $key )
- {
- $item.value = $value;
- $Found = $true;
- }
- }
-
- if( -not $Found)
- {
- $newElement = $xml.CreateElement("add")
- $nameAtt1 = $xml.CreateAttribute("key")
- $nameAtt1.psbase.value = $key;
- $null = $newElement.SetAttributeNode($nameAtt1)
-
- $nameAtt2 = $xml.CreateAttribute("value")
- $nameAtt2.psbase.value = $value;
- $null = $newElement.SetAttributeNode($nameAtt2)
-
- $null = $xml.configuration["appSettings"].AppendChild($newElement)
- }
- }
-
- $xml.Save($webconfig)
-}
-
-<#
-.Synopsis
- Set the binding redirect setting in the web.config to redirect 10.0.0.0 version of microsoft.isam.esent.interop to 6.3.0.0.
-.DESCRIPTION
- This function creates the following section in the web.config:
-
-
-
-
-
-
-
-
-#>
-function Set-BindingRedirectSettingInWebConfig
-{
- param (
-
- # Physical path for the IIS Endpoint on the machine (possibly under inetpub)
- [parameter(Mandatory)]
- [ValidateNotNullOrEmpty()]
- [String] $path,
-
- # old version of the assembly
- [String] $oldVersion = "10.0.0.0",
-
- # new version to redirect to
- [String] $newVersion = "6.3.0.0"
-
- )
-
- $webconfig = Join-Path $path "web.config"
-
- if (Test-Path $webconfig)
- {
- $xml = [xml](get-content $webconfig)
-
- if(-not($xml.get_DocumentElement().runtime))
- {
- # Create the section
- $runtimeSetting = $xml.CreateElement("runtime")
-
- # Create the section
- $assemblyBindingSetting = $xml.CreateElement("assemblyBinding")
- $xmlnsAttribute = $xml.CreateAttribute("xmlns")
- $xmlnsAttribute.Value = "urn:schemas-microsoft-com:asm.v1"
- $assemblyBindingSetting.Attributes.Append($xmlnsAttribute)
-
- # The section goes inside
- $null = $runtimeSetting.AppendChild($assemblyBindingSetting)
-
- # Create the section
- $dependentAssemblySetting = $xml.CreateElement("dependentAssembly")
-
- #The section goes inside
- $null = $assemblyBindingSetting.AppendChild($dependentAssemblySetting)
-
- # Create the section
- $assemblyIdentitySetting = $xml.CreateElement("assemblyIdentity")
- $nameAttribute = $xml.CreateAttribute("name")
- $nameAttribute.Value = "microsoft.isam.esent.interop"
- $publicKeyTokenAttribute = $xml.CreateAttribute("publicKeyToken")
- $publicKeyTokenAttribute.Value = "31bf3856ad364e35"
- $null = $assemblyIdentitySetting.Attributes.Append($nameAttribute)
- $null = $assemblyIdentitySetting.Attributes.Append($publicKeyTokenAttribute)
-
- # section goes inside
- $dependentAssemblySetting.AppendChild($assemblyIdentitySetting)
-
- # Create the section
- $bindingRedirectSetting = $xml.CreateElement("bindingRedirect")
- $oldVersionAttribute = $xml.CreateAttribute("oldVersion")
- $newVersionAttribute = $xml.CreateAttribute("newVersion")
- $oldVersionAttribute.Value = $oldVersion
- $newVersionAttribute.Value = $newVersion
- $null = $bindingRedirectSetting.Attributes.Append($oldVersionAttribute)
- $null = $bindingRedirectSetting.Attributes.Append($newVersionAttribute)
-
- # The section goes inside section
- $dependentAssemblySetting.AppendChild($bindingRedirectSetting)
-
- # The section goes inside section
- $xml.configuration.AppendChild($runtimeSetting)
-
- $xml.Save($webconfig)
- }
- }
-}
-
-Export-ModuleMember -function New-PSWSEndpoint, Set-AppSettingsInWebconfig, Set-BindingRedirectSettingInWebConfig, Remove-PSWSEndpoint
+# This module file contains a utility to perform PSWS IIS Endpoint setup
+# Module exports New-PSWSEndpoint function to perform the endpoint setup
+#
+#Copyright (c) Microsoft Corporation, 2014
+#
+
+# name and description for the Firewall rules. Used in multiple locations
+$FireWallRuleDisplayName = "Desired State Configuration - Pull Server Port:{0}"
+$FireWallRuleDescription = "Inbound traffic for IIS site on Port:{0} for DSC pull server. Created by DSCWebService resource"
+
+# Validate supplied configuration to setup the PSWS Endpoint
+# Function checks for the existence of PSWS Schema files, IIS config
+# Also validate presence of IIS on the target machine
+#
+function Initialize-Endpoint
+{
+ param (
+ $site,
+ $path,
+ $cfgfile,
+ $port,
+ $app,
+ $applicationPoolIdentityType,
+ $svc,
+ $mof,
+ $dispatch,
+ $asax,
+ $dependentBinaries,
+ $language,
+ $dependentMUIFiles,
+ $psFiles,
+ $removeSiteFiles = $false,
+ $certificateThumbPrint,
+ $enable32BitAppOnWin64)
+
+ if (!(Test-Path $cfgfile))
+ {
+ throw "ERROR: $cfgfile does not exist"
+ }
+
+ if (!(Test-Path $svc))
+ {
+ throw "ERROR: $svc does not exist"
+ }
+
+ if (!(Test-Path $mof))
+ {
+ throw "ERROR: $mof does not exist"
+ }
+
+ if (!(Test-Path $asax))
+ {
+ throw "ERROR: $asax does not exist"
+ }
+
+ if ($certificateThumbPrint -ne "AllowUnencryptedTraffic")
+ {
+ Write-Verbose "Verify that the certificate with the provided thumbprint exists in CERT:\LocalMachine\MY\"
+ $certificate = Get-childItem CERT:\LocalMachine\MY\ | Where {$_.Thumbprint -eq $certificateThumbPrint}
+ if (!$Certificate)
+ {
+ throw "ERROR: Certificate with thumbprint $certificateThumbPrint does not exist in CERT:\LocalMachine\MY\"
+ }
+ }
+
+ Test-IISInstall
+
+ $appPool = "PSWS"
+
+
+ Write-Verbose "Delete the App Pool if it exists"
+ Remove-AppPool -apppool $appPool
+
+ Write-Verbose "Remove the site if it already exists"
+ Update-Site -siteName $site -siteAction Remove
+
+ # check for existing binding, there should be no binding with the same port
+ if ((Get-WebBinding | where bindingInformation -eq "*:$($port):").count -gt 0)
+ {
+ throw "ERROR: Port $port is already used, please review existing sites and change the port to be used."
+ }
+
+ if ($removeSiteFiles)
+ {
+ if(Test-Path $path)
+ {
+ Remove-Item -Path $path -Recurse -Force
+ }
+ }
+
+ Copy-Files -path $path -cfgfile $cfgfile -svc $svc -mof $mof -dispatch $dispatch -asax $asax -dependentBinaries $dependentBinaries -language $language -dependentMUIFiles $dependentMUIFiles -psFiles $psFiles
+
+ New-IISWebSite -site $site -path $path -port $port -app $app -apppool $appPool -applicationPoolIdentityType $applicationPoolIdentityType -certificateThumbPrint $certificateThumbPrint -enable32BitAppOnWin64 $enable32BitAppOnWin64
+}
+
+# Validate if IIS and all required dependencies are installed on the target machine
+#
+function Test-IISInstall
+{
+ Write-Verbose "Checking IIS requirements"
+ $iisVersion = (Get-ItemProperty HKLM:\SOFTWARE\Microsoft\InetStp -ErrorAction silentlycontinue).MajorVersion
+
+ if ($iisVersion -lt 7)
+ {
+ throw "ERROR: IIS Version detected is $iisVersion , must be running higher than 7.0"
+ }
+
+ $wsRegKey = (Get-ItemProperty hklm:\SYSTEM\CurrentControlSet\Services\W3SVC -ErrorAction silentlycontinue).ImagePath
+ if ($wsRegKey -eq $null)
+ {
+ throw "ERROR: Cannot retrive W3SVC key. IIS Web Services may not be installed"
+ }
+
+ if ((Get-Service w3svc).Status -ne "running")
+ {
+ throw "ERROR: service W3SVC is not running"
+ }
+}
+
+# Verify if a given IIS Site exists
+#
+function Test-IISSiteExists
+{
+ param ($siteName)
+
+ if (Get-Website -Name $siteName)
+ {
+ return $true
+ }
+
+ return $false
+}
+
+# Perform an action (such as stop, start, delete) for a given IIS Site
+#
+function Update-Site
+{
+ param (
+ [Parameter(ParameterSetName = 'SiteName', Mandatory, Position = 0)]
+ [ValidateNotNullOrEmpty()]
+ [String]$siteName,
+
+ [Parameter(ParameterSetName = 'Site', Mandatory, Position = 0)]
+ $site,
+
+ [Parameter(ParameterSetName = 'SiteName', Mandatory, Position = 1)]
+ [Parameter(ParameterSetName = 'Site', Mandatory, Position = 1)]
+ [String]$siteAction)
+
+ [String]$name = $null
+ if ($PSCmdlet.ParameterSetName -eq 'SiteName')
+ {
+ $name = $siteName
+ }
+ elseif ($PSCmdlet.ParameterSetName -eq 'Site')
+ {
+ $name = $site.Name
+ }
+
+ if (Test-IISSiteExists -siteName $name)
+ {
+ switch ($siteAction)
+ {
+ "Start" {Start-Website -Name "$name"}
+ "Stop" {Stop-Website -Name "$name" -ErrorAction SilentlyContinue}
+ "Remove" {Remove-Website -Name "$name"}
+ }
+ Write-Verbose "p11"
+ }
+}
+
+# Delete the given IIS Application Pool
+# This is required to cleanup any existing conflicting apppools before setting up the endpoint
+#
+function Remove-AppPool
+{
+ param ($appPool)
+
+ # without this tests we may get a breaking error here, despite SilentlyContinue
+ if (Test-Path "IIS:\AppPools\$appPool")
+ {
+ Remove-WebAppPool -Name $appPool -ErrorAction SilentlyContinue
+ }
+}
+
+# Generate an IIS Site Id while setting up the endpoint
+# The Site Id will be the max available in IIS config + 1
+#
+function New-SiteID
+{
+ return ((Get-Website | % { $_.Id } | Measure-Object -Maximum).Maximum + 1)
+}
+
+# Validate the PSWS config files supplied and copy to the IIS endpoint in inetpub
+#
+function Copy-Files
+{
+ param (
+ $path,
+ $cfgfile,
+ $svc,
+ $mof,
+ $dispatch,
+ $asax,
+ $dependentBinaries,
+ $language,
+ $dependentMUIFiles,
+ $psFiles)
+
+ if (!(Test-Path $cfgfile))
+ {
+ throw "ERROR: $cfgfile does not exist"
+ }
+
+ if (!(Test-Path $svc))
+ {
+ throw "ERROR: $svc does not exist"
+ }
+
+ if (!(Test-Path $mof))
+ {
+ throw "ERROR: $mof does not exist"
+ }
+
+ if (!(Test-Path $asax))
+ {
+ throw "ERROR: $asax does not exist"
+ }
+
+ if (!(Test-Path $path))
+ {
+ $null = New-Item -ItemType container -Path $path
+ }
+
+ foreach ($dependentBinary in $dependentBinaries)
+ {
+ if (!(Test-Path $dependentBinary))
+ {
+ throw "ERROR: $dependentBinary does not exist"
+ }
+ }
+
+ <#foreach ($dependentMUIFile in $dependentMUIFiles)
+ {
+ if (!(Test-Path $dependentMUIFile))
+ {
+ throw "ERROR: $dependentMUIFile does not exist"
+ }
+ }#>
+
+ Write-Verbose "Create the bin folder for deploying custom dependent binaries required by the endpoint"
+ $binFolderPath = Join-Path $path "bin"
+ $null = New-Item -path $binFolderPath -itemType "directory" -Force
+ Copy-Item $dependentBinaries $binFolderPath -Force
+
+ <#if ($language)
+ {
+ $muiPath = Join-Path $binFolderPath $language
+
+ if (!(Test-Path $muiPath))
+ {
+ $null = New-Item -ItemType container $muiPath
+ }
+ Copy-Item $dependentMUIFiles $muiPath -Force
+ }#>
+
+ foreach ($psFile in $psFiles)
+ {
+ if (!(Test-Path $psFile))
+ {
+ throw "ERROR: $psFile does not exist"
+ }
+
+ Copy-Item $psFile $path -Force
+ }
+
+ Copy-Item $cfgfile (Join-Path $path "web.config") -Force
+ Copy-Item $svc $path -Force
+ Copy-Item $mof $path -Force
+
+ if ($dispatch)
+ {
+ Copy-Item $dispatch $path -Force
+ }
+
+ if ($asax)
+ {
+ Copy-Item $asax $path -Force
+ }
+}
+
+# Setup IIS Apppool, Site and Application
+#
+function New-IISWebSite
+{
+ param (
+ $site,
+ $path,
+ $port,
+ $app,
+ $appPool,
+ $applicationPoolIdentityType,
+ $certificateThumbPrint,
+ $enable32BitAppOnWin64)
+
+ $siteID = New-SiteID
+
+ Write-Verbose "Adding App Pool"
+ $null = New-WebAppPool -Name $appPool
+
+ Write-Verbose "Set App Pool Properties"
+ $appPoolIdentity = 4
+ if ($applicationPoolIdentityType)
+ {
+ # LocalSystem = 0, LocalService = 1, NetworkService = 2, SpecificUser = 3, ApplicationPoolIdentity = 4
+ if ($applicationPoolIdentityType -eq "LocalSystem")
+ {
+ $appPoolIdentity = 0
+ }
+ elseif ($applicationPoolIdentityType -eq "LocalService")
+ {
+ $appPoolIdentity = 1
+ }
+ elseif ($applicationPoolIdentityType -eq "NetworkService")
+ {
+ $appPoolIdentity = 2
+ }
+ }
+
+ $appPoolItem = Get-Item IIS:\AppPools\$appPool
+ $appPoolItem.managedRuntimeVersion = "v4.0"
+ $appPoolItem.enable32BitAppOnWin64 = $enable32BitAppOnWin64
+ $appPoolItem.processModel.identityType = $appPoolIdentity
+ $appPoolItem | Set-Item
+
+ Write-Verbose "Add and Set Site Properties"
+ if ($certificateThumbPrint -eq "AllowUnencryptedTraffic")
+ {
+ $webSite = New-WebSite -Name $site -Id $siteID -Port $port -IPAddress "*" -PhysicalPath $path -ApplicationPool $appPool
+ }
+ else
+ {
+ $webSite = New-WebSite -Name $site -Id $siteID -Port $port -IPAddress "*" -PhysicalPath $path -ApplicationPool $appPool -Ssl
+
+ # Remove existing binding for $port
+ Remove-Item IIS:\SSLBindings\0.0.0.0!$port -ErrorAction Ignore
+
+ # Create a new binding using the supplied certificate
+ $null = Get-Item CERT:\LocalMachine\MY\$certificateThumbPrint | New-Item IIS:\SSLBindings\0.0.0.0!$port
+ }
+
+ Update-Site -siteName $site -siteAction Start
+}
+
+# Allow Clients outsite the machine to access the setup endpoint on a User Port
+#
+function New-FirewallRule
+{
+ param ($firewallPort)
+
+ $script:netsh = "$env:windir\system32\netsh.exe"
+
+ Write-Verbose "Disable Inbound Firewall Notification"
+ & $script:netsh advfirewall set currentprofile settings inboundusernotification disable
+
+ # remove all existing rules with that displayName
+ & $script:netsh advfirewall firewall delete rule name=DSCPullServer_IIS_Port protocol=tcp localport=$firewallPort | Out-Null
+
+ Write-Verbose "Add Firewall Rule for port $firewallPort"
+ & $script:netsh advfirewall firewall add rule name=DSCPullServer_IIS_Port dir=in action=allow protocol=TCP localport=$firewallPort
+}
+
+# Enable & Clear PSWS Operational/Analytic/Debug ETW Channels
+#
+function Enable-PSWSETW
+{
+ # Disable Analytic Log
+ & $script:wevtutil sl Microsoft-Windows-ManagementOdataService/Analytic /e:false /q | Out-Null
+
+ # Disable Debug Log
+ & $script:wevtutil sl Microsoft-Windows-ManagementOdataService/Debug /e:false /q | Out-Null
+
+ # Clear Operational Log
+ & $script:wevtutil cl Microsoft-Windows-ManagementOdataService/Operational | Out-Null
+
+ # Enable/Clear Analytic Log
+ & $script:wevtutil sl Microsoft-Windows-ManagementOdataService/Analytic /e:true /q | Out-Null
+
+ # Enable/Clear Debug Log
+ & $script:wevtutil sl Microsoft-Windows-ManagementOdataService/Debug /e:true /q | Out-Null
+}
+
+<#
+.Synopsis
+ Create PowerShell WebServices IIS Endpoint
+.DESCRIPTION
+ Creates a PSWS IIS Endpoint by consuming PSWS Schema and related dependent files
+.EXAMPLE
+ New a PSWS Endpoint [@ http://Server:39689/PSWS_Win32Process] by consuming PSWS Schema Files and any dependent scripts/binaries
+ New-PSWSEndpoint -site Win32Process -path $env:SystemDrive\inetpub\PSWS_Win32Process -cfgfile Win32Process.config -port 39689 -app Win32Process -svc PSWS.svc -mof Win32Process.mof -dispatch Win32Process.xml -dependentBinaries ConfigureProcess.ps1, Rbac.dll -psFiles Win32Process.psm1
+#>
+function New-PSWSEndpoint
+{
+[CmdletBinding()]
+ param (
+
+ # Unique Name of the IIS Site
+ [String] $site = "PSWS",
+
+ # Physical path for the IIS Endpoint on the machine (under inetpub)
+ [String] $path = "$env:SystemDrive\inetpub\PSWS",
+
+ # Web.config file
+ [String] $cfgfile = "web.config",
+
+ # Port # for the IIS Endpoint
+ [Int] $port = 8080,
+
+ # IIS Application Name for the Site
+ [String] $app = "PSWS",
+
+ # IIS App Pool Identity Type - must be one of LocalService, LocalSystem, NetworkService, ApplicationPoolIdentity
+ [ValidateSet('LocalService', 'LocalSystem', 'NetworkService', 'ApplicationPoolIdentity')]
+ [String] $applicationPoolIdentityType,
+
+ # WCF Service SVC file
+ [String] $svc = "PSWS.svc",
+
+ # PSWS Specific MOF Schema File
+ [parameter(Mandatory)]
+ [ValidateNotNullOrEmpty()]
+ [String] $mof,
+
+ # PSWS Specific Dispatch Mapping File [Optional]
+ [ValidateNotNullOrEmpty()]
+ [String] $dispatch,
+
+ # Global.asax file [Optional]
+ [ValidateNotNullOrEmpty()]
+ [String] $asax,
+
+ # Any dependent binaries that need to be deployed to the IIS endpoint, in the bin folder
+ [ValidateNotNullOrEmpty()]
+ [String[]] $dependentBinaries,
+
+ # MUI Language [Optional]
+ [ValidateNotNullOrEmpty()]
+ [String] $language,
+
+ # Any dependent binaries that need to be deployed to the IIS endpoint, in the bin\mui folder [Optional]
+ [ValidateNotNullOrEmpty()]
+ [String[]] $dependentMUIFiles,
+
+ # Any dependent PowerShell Scipts/Modules that need to be deployed to the IIS endpoint application root
+ [ValidateNotNullOrEmpty()]
+ [String[]] $psFiles,
+
+ # True to remove all files for the site at first, false otherwise
+ [Boolean]$removeSiteFiles = $false,
+
+ # Enable Firewall Exception for the supplied port
+ [Boolean] $EnableFirewallException,
+
+ # Enable and Clear PSWS ETW
+ [switch] $EnablePSWSETW,
+
+ # Thumbprint of the Certificate in CERT:\LocalMachine\MY\ for Pull Server
+ [String] $certificateThumbPrint = "AllowUnencryptedTraffic",
+
+ # When this property is set to true, Pull Server will run on a 32 bit process on a 64 bit machine
+ [boolean]$Enable32BitAppOnWin64 = $false)
+
+ $script:wevtutil = "$env:windir\system32\Wevtutil.exe"
+
+ $svcName = Split-Path $svc -Leaf
+ $protocol = "https:"
+ if ($certificateThumbPrint -eq "AllowUnencryptedTraffic")
+ {
+ $protocol = "http:"
+ }
+
+ # Get Machine Name
+ $cimInstance = Get-CimInstance -ClassName Win32_ComputerSystem -Verbose:$false
+
+ Write-Verbose ("Setting up endpoint at - $protocol//" + $cimInstance.Name + ":" + $port + "/" + $svcName)
+ Initialize-Endpoint -site $site -path $path -cfgfile $cfgfile -port $port -app $app `
+ -applicationPoolIdentityType $applicationPoolIdentityType -svc $svc -mof $mof `
+ -dispatch $dispatch -asax $asax -dependentBinaries $dependentBinaries `
+ -language $language -dependentMUIFiles $dependentMUIFiles -psFiles $psFiles `
+ -removeSiteFiles $removeSiteFiles -certificateThumbPrint $certificateThumbPrint `
+ -enable32BitAppOnWin64 $Enable32BitAppOnWin64
+
+ if ($EnableFirewallException -eq $true)
+ {
+ Write-Verbose "Enabling firewall exception for port $port"
+ $null = New-FirewallRule $port
+ }
+
+ if ($EnablePSWSETW)
+ {
+ Enable-PSWSETW
+ }
+}
+
+<#
+.Synopsis
+ Removes a DSC WebServices IIS Endpoint
+.DESCRIPTION
+ Removes a PSWS IIS Endpoint
+.EXAMPLE
+ Remove the endpoint with the specified name
+ Remove-PSWSEndpoint -siteName PSDSCPullServer
+#>
+function Remove-PSWSEndpoint
+{
+[CmdletBinding()]
+ param (
+ # Unique Name of the IIS Site
+ [String] $siteName
+ )
+
+ # get the site to remove
+ $site = Get-Item -Path "IIS:\sites\$siteName"
+ # and the pool it is using
+ $pool = $site.applicationPool
+
+ # get the path so we can delete the files
+ $filePath = $site.PhysicalPath
+ # get the port number for the Firewall rule
+ $bindings = (Get-WebBinding -Name $siteName).bindingInformation
+ $port = [regex]::match($bindings,':(\d+):').Groups[1].Value
+
+ # remove the actual site.
+ Remove-Website -Name $siteName
+ # there may be running requests, wait a little
+ # I had an issue where the files were still in use
+ # when I tried to delete them
+ Start-Sleep -Milliseconds 200
+
+ # remove the files for the site
+ If (Test-Path $filePath)
+ {
+ Get-ChildItem $filePath -Recurse | Remove-Item -Recurse
+ Remove-Item $filePath
+ }
+
+ # find out whether any other site is using this pool
+ $filter = "/system.applicationHost/sites/site/application[@applicationPool='" + $pool + "']"
+ $apps = (Get-WebConfigurationProperty -Filter $filter -PSPath "machine/webroot/apphost" -name path).ItemXPath
+ if (-not $apps -or $apps.count -eq 1)
+ {
+ # if we are the only site in the pool, remove the pool as well.
+ Remove-WebAppPool -Name $pool
+ }
+
+
+ # remove all rules with that name
+ $ruleName = ($($FireWallRuleDisplayName) -f $port)
+ Get-NetFirewallRule | Where-Object DisplayName -eq "$ruleName" | Remove-NetFirewallRule
+
+}
+
+<#
+.Synopsis
+ Set the option into the web.config for an endpoint
+.DESCRIPTION
+ Set the options into the web.config for an endpoint allowing customization.
+.EXAMPLE
+#>
+function Set-AppSettingsInWebconfig
+{
+ param (
+
+ # Physical path for the IIS Endpoint on the machine (possibly under inetpub)
+ [parameter(Mandatory)]
+ [ValidateNotNullOrEmpty()]
+ [String] $path,
+
+ # Key to add/update
+ [parameter(Mandatory)]
+ [ValidateNotNullOrEmpty()]
+ [String] $key,
+
+ # Value
+ [parameter(Mandatory)]
+ [ValidateNotNullOrEmpty()]
+ [String] $value
+
+ )
+
+ $webconfig = Join-Path $path "web.config"
+ [bool] $Found = $false
+
+ if (Test-Path $webconfig)
+ {
+ $xml = [xml](get-content $webconfig)
+ $root = $xml.get_DocumentElement()
+
+ foreach( $item in $root.appSettings.add)
+ {
+ if( $item.key -eq $key )
+ {
+ $item.value = $value;
+ $Found = $true;
+ }
+ }
+
+ if( -not $Found)
+ {
+ $newElement = $xml.CreateElement("add")
+ $nameAtt1 = $xml.CreateAttribute("key")
+ $nameAtt1.psbase.value = $key;
+ $null = $newElement.SetAttributeNode($nameAtt1)
+
+ $nameAtt2 = $xml.CreateAttribute("value")
+ $nameAtt2.psbase.value = $value;
+ $null = $newElement.SetAttributeNode($nameAtt2)
+
+ $null = $xml.configuration["appSettings"].AppendChild($newElement)
+ }
+ }
+
+ $xml.Save($webconfig)
+}
+
+<#
+.Synopsis
+ Set the binding redirect setting in the web.config to redirect 10.0.0.0 version of microsoft.isam.esent.interop to 6.3.0.0.
+.DESCRIPTION
+ This function creates the following section in the web.config:
+
+
+
+
+
+
+
+
+#>
+function Set-BindingRedirectSettingInWebConfig
+{
+ param (
+
+ # Physical path for the IIS Endpoint on the machine (possibly under inetpub)
+ [parameter(Mandatory)]
+ [ValidateNotNullOrEmpty()]
+ [String] $path,
+
+ # old version of the assembly
+ [String] $oldVersion = "10.0.0.0",
+
+ # new version to redirect to
+ [String] $newVersion = "6.3.0.0"
+
+ )
+
+ $webconfig = Join-Path $path "web.config"
+
+ if (Test-Path $webconfig)
+ {
+ $xml = [xml](get-content $webconfig)
+
+ if(-not($xml.get_DocumentElement().runtime))
+ {
+ # Create the section
+ $runtimeSetting = $xml.CreateElement("runtime")
+
+ # Create the section
+ $assemblyBindingSetting = $xml.CreateElement("assemblyBinding")
+ $xmlnsAttribute = $xml.CreateAttribute("xmlns")
+ $xmlnsAttribute.Value = "urn:schemas-microsoft-com:asm.v1"
+ $assemblyBindingSetting.Attributes.Append($xmlnsAttribute)
+
+ # The section goes inside
+ $null = $runtimeSetting.AppendChild($assemblyBindingSetting)
+
+ # Create the section
+ $dependentAssemblySetting = $xml.CreateElement("dependentAssembly")
+
+ #The section goes inside
+ $null = $assemblyBindingSetting.AppendChild($dependentAssemblySetting)
+
+ # Create the section
+ $assemblyIdentitySetting = $xml.CreateElement("assemblyIdentity")
+ $nameAttribute = $xml.CreateAttribute("name")
+ $nameAttribute.Value = "microsoft.isam.esent.interop"
+ $publicKeyTokenAttribute = $xml.CreateAttribute("publicKeyToken")
+ $publicKeyTokenAttribute.Value = "31bf3856ad364e35"
+ $null = $assemblyIdentitySetting.Attributes.Append($nameAttribute)
+ $null = $assemblyIdentitySetting.Attributes.Append($publicKeyTokenAttribute)
+
+ # section goes inside
+ $dependentAssemblySetting.AppendChild($assemblyIdentitySetting)
+
+ # Create the section
+ $bindingRedirectSetting = $xml.CreateElement("bindingRedirect")
+ $oldVersionAttribute = $xml.CreateAttribute("oldVersion")
+ $newVersionAttribute = $xml.CreateAttribute("newVersion")
+ $oldVersionAttribute.Value = $oldVersion
+ $newVersionAttribute.Value = $newVersion
+ $null = $bindingRedirectSetting.Attributes.Append($oldVersionAttribute)
+ $null = $bindingRedirectSetting.Attributes.Append($newVersionAttribute)
+
+ # The section goes inside section
+ $dependentAssemblySetting.AppendChild($bindingRedirectSetting)
+
+ # The section goes inside section
+ $xml.configuration.AppendChild($runtimeSetting)
+
+ $xml.Save($webconfig)
+ }
+ }
+}
+
+Export-ModuleMember -function New-PSWSEndpoint, Set-AppSettingsInWebconfig, Set-BindingRedirectSettingInWebConfig, Remove-PSWSEndpoint
diff --git a/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.schema.mof b/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.schema.mof
index bcb2fb700..32a8db88d 100644
--- a/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.schema.mof
+++ b/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.schema.mof
@@ -1,9 +1,9 @@
-[ClassVersion("1.0.0"), FriendlyName("xEnvironment")]
-class MSFT_xEnvironmentResource : OMI_BaseResource
-{
- [Key, Description("The name of the environment variable for which you want to ensure a specific state.")] String Name;
- [Write, Description("The desired value for the environment variable.")] String Value;
- [Write, Description("Specifies if the environment varaible should exist."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure;
- [Write, Description("Indicates whether or not the environment variable is the Path variable.")] Boolean Path;
- [Write, Description("Indicates the target where the environment variable should be set."), ValueMap{"Process", "Machine"}, Values{"Process", "Machine"}] String Target[];
-};
+[ClassVersion("1.0.0"), FriendlyName("xEnvironment")]
+class MSFT_xEnvironmentResource : OMI_BaseResource
+{
+ [Key, Description("The name of the environment variable for which you want to ensure a specific state.")] String Name;
+ [Write, Description("The desired value for the environment variable.")] String Value;
+ [Write, Description("Specifies if the environment varaible should exist."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure;
+ [Write, Description("Indicates whether or not the environment variable is the Path variable.")] Boolean Path;
+ [Write, Description("Indicates the target where the environment variable should be set."), ValueMap{"Process", "Machine"}, Values{"Process", "Machine"}] String Target[];
+};
diff --git a/DSCResources/MSFT_xEnvironmentResource/en-US/MSFT_xEnvironmentResource.strings.psd1 b/DSCResources/MSFT_xEnvironmentResource/en-US/MSFT_xEnvironmentResource.strings.psd1
index e8ce88704..caed8be6d 100644
--- a/DSCResources/MSFT_xEnvironmentResource/en-US/MSFT_xEnvironmentResource.strings.psd1
+++ b/DSCResources/MSFT_xEnvironmentResource/en-US/MSFT_xEnvironmentResource.strings.psd1
@@ -1,21 +1,21 @@
-# Localized resources for MSFT_xEnvironmentResource
-
-ConvertFrom-StringData @'
- ArgumentTooLong = Argument is too long.
- CannotSetValueToEmpty = Cannot create environment variable with an empty value. Set Ensure = Absent to remove environment variable '{0}'.
- EnvVarCreated = Environment variable '{0}' created with value '{1}'.
- EnvVarSetError = Failed to set environment variable '{0}' to value '{1}'.
- EnvVarPathSetError = Failed to add path '{0}' to environment variable '{1}' holding value '{2}'.
- EnvVarRemoveError = Failed to remove environment variable '{0}' holding value '{1}'.
- EnvVarPathRemoveError = Failed to remove path '{0}' from variable '{1}' holding value '{2}'.
- EnvVarUnchanged = Environment variable '{0}' with value '{1}' was not updated.
- EnvVarUpdated = Environment variable '{0}' updated from value '{1}' to value '{2}'.
- EnvVarPathUnchanged = Path environment variable '{0}' with value '{1}' was not updated.
- EnvVarPathUpdated = Environment variable '{0}' updated from value '{1}' to value '{2}'.
- EnvVarNotFound = Environment variable '{0}' does not exist.
- EnvVarFound = Environment variable '{0}' with value '{1}' was successfully found.
- EnvVarFoundWithMisMatchingValue = Environment variable '{0}' with value '{1}' mismatched the specified value '{2}'.
- EnvVarRemoved = Environment variable '{0}' removed.
- GetItemPropertyFailure = Failed to get the item property for variable '{0}' with path '{1}'.
- RemoveNonExistentVarError = Environment variable '{0}' cannot be removed because it does not exist.
-'@
+# Localized resources for MSFT_xEnvironmentResource
+
+ConvertFrom-StringData @'
+ ArgumentTooLong = Argument is too long.
+ CannotSetValueToEmpty = Cannot create environment variable with an empty value. Set Ensure = Absent to remove environment variable '{0}'.
+ EnvVarCreated = Environment variable '{0}' created with value '{1}'.
+ EnvVarSetError = Failed to set environment variable '{0}' to value '{1}'.
+ EnvVarPathSetError = Failed to add path '{0}' to environment variable '{1}' holding value '{2}'.
+ EnvVarRemoveError = Failed to remove environment variable '{0}' holding value '{1}'.
+ EnvVarPathRemoveError = Failed to remove path '{0}' from variable '{1}' holding value '{2}'.
+ EnvVarUnchanged = Environment variable '{0}' with value '{1}' was not updated.
+ EnvVarUpdated = Environment variable '{0}' updated from value '{1}' to value '{2}'.
+ EnvVarPathUnchanged = Path environment variable '{0}' with value '{1}' was not updated.
+ EnvVarPathUpdated = Environment variable '{0}' updated from value '{1}' to value '{2}'.
+ EnvVarNotFound = Environment variable '{0}' does not exist.
+ EnvVarFound = Environment variable '{0}' with value '{1}' was successfully found.
+ EnvVarFoundWithMisMatchingValue = Environment variable '{0}' with value '{1}' mismatched the specified value '{2}'.
+ EnvVarRemoved = Environment variable '{0}' removed.
+ GetItemPropertyFailure = Failed to get the item property for variable '{0}' with path '{1}'.
+ RemoveNonExistentVarError = Environment variable '{0}' cannot be removed because it does not exist.
+'@
diff --git a/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.schema.mof b/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.schema.mof
index 6c7f46ac1..46e8441e7 100644
--- a/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.schema.mof
+++ b/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.schema.mof
@@ -1,29 +1,29 @@
-[ClassVersion("1.0.0"),FriendlyName("xPackage")]
-class MSFT_xPackageResource : OMI_BaseResource
-{
- [write,ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] string Ensure;
- [Key] string Name;
- [required] string Path;
- [Key] string ProductId;
- [write] string Arguments;
- [write,EmbeddedInstance("MSFT_Credential")] string Credential;
- [write] uint32 ReturnCode[];
- [write] string LogPath;
- [read] string PackageDescription;
- [read] string Publisher;
- [read] string InstalledOn;
- [read] uint32 Size;
- [read] string Version;
- [read] boolean Installed;
- [write] string FileHash;
- [write,ValueMap{"SHA1","SHA256","SHA384","SHA512","MD5","RIPEMD160"},Values{"SHA1","SHA256","SHA384","SHA512","MD5","RIPEMD160"}] string HashAlgorithm;
- [write] string SignerSubject;
- [write] string SignerThumbprint;
- [write] string ServerCertificateValidationCallback;
- [write,ValueMap{"LocalMachine","CurrentUser"},Values{"LocalMachine","CurrentUser"}] string InstalledCheckRegHive;
- [write] string InstalledCheckRegKey;
- [write] string InstalledCheckRegValueName;
- [write] string InstalledCheckRegValueData;
- [write] boolean CreateCheckRegValue;
- [write,EmbeddedInstance("MSFT_Credential")] string RunAsCredential;
-};
+[ClassVersion("1.0.0"),FriendlyName("xPackage")]
+class MSFT_xPackageResource : OMI_BaseResource
+{
+ [write,ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] string Ensure;
+ [Key] string Name;
+ [required] string Path;
+ [Key] string ProductId;
+ [write] string Arguments;
+ [write,EmbeddedInstance("MSFT_Credential")] string Credential;
+ [write] uint32 ReturnCode[];
+ [write] string LogPath;
+ [read] string PackageDescription;
+ [read] string Publisher;
+ [read] string InstalledOn;
+ [read] uint32 Size;
+ [read] string Version;
+ [read] boolean Installed;
+ [write] string FileHash;
+ [write,ValueMap{"SHA1","SHA256","SHA384","SHA512","MD5","RIPEMD160"},Values{"SHA1","SHA256","SHA384","SHA512","MD5","RIPEMD160"}] string HashAlgorithm;
+ [write] string SignerSubject;
+ [write] string SignerThumbprint;
+ [write] string ServerCertificateValidationCallback;
+ [write,ValueMap{"LocalMachine","CurrentUser"},Values{"LocalMachine","CurrentUser"}] string InstalledCheckRegHive;
+ [write] string InstalledCheckRegKey;
+ [write] string InstalledCheckRegValueName;
+ [write] string InstalledCheckRegValueData;
+ [write] boolean CreateCheckRegValue;
+ [write,EmbeddedInstance("MSFT_Credential")] string RunAsCredential;
+};
diff --git a/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.schema.mof b/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.schema.mof
index d280b4d78..ca296bf92 100644
--- a/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.schema.mof
+++ b/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.schema.mof
@@ -1,11 +1,11 @@
-[ClassVersion("1.0.0"), FriendlyName("xRegistry")]
-class MSFT_xRegistryResource : OMI_BaseResource
-{
- [Key, Description("The path of the registry key to add, modify, or remove. This path must include the registry hive/drive.")] String Key;
- [Key, Description("The name of the registry value. To add or remove a registry key, specify this property as an empty string without specifying ValueType or ValueData. To modify or remove the default value of a registry key, specify this property as an empty string while also specifying ValueType or ValueData.")] String ValueName;
- [Write, Description("The data the specified registry key value should have as a string or an array of strings (MultiString only).")] String ValueData[];
- [Write, Description("The type the specified registry key value should have."), ValueMap{"String", "Binary", "DWord", "QWord", "MultiString", "ExpandString"},Values{"String", "Binary", "DWord", "QWord", "MultiString", "ExpandString"}] String ValueType;
- [Write, Description("Specifies whether or not the registry key or value should exist. To add or modify a registry key or value, set this property to Present. To remove a registry key or value, set the property to Absent."), ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure;
- [Write, Description("Specifies whether or not the specified DWord or QWord registry key data is provided in a hexadecimal format. Not valid for types other than DWord and QWord. The default value is $false.")] Boolean Hex;
- [Write, Description("Specifies whether or not to overwrite the specified registry key value if it already has a value or whether or not to delete a registry key that has subkeys. The default value is $false.")] Boolean Force;
-};
+[ClassVersion("1.0.0"), FriendlyName("xRegistry")]
+class MSFT_xRegistryResource : OMI_BaseResource
+{
+ [Key, Description("The path of the registry key to add, modify, or remove. This path must include the registry hive/drive.")] String Key;
+ [Key, Description("The name of the registry value. To add or remove a registry key, specify this property as an empty string without specifying ValueType or ValueData. To modify or remove the default value of a registry key, specify this property as an empty string while also specifying ValueType or ValueData.")] String ValueName;
+ [Write, Description("The data the specified registry key value should have as a string or an array of strings (MultiString only).")] String ValueData[];
+ [Write, Description("The type the specified registry key value should have."), ValueMap{"String", "Binary", "DWord", "QWord", "MultiString", "ExpandString"},Values{"String", "Binary", "DWord", "QWord", "MultiString", "ExpandString"}] String ValueType;
+ [Write, Description("Specifies whether or not the registry key or value should exist. To add or modify a registry key or value, set this property to Present. To remove a registry key or value, set the property to Absent."), ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure;
+ [Write, Description("Specifies whether or not the specified DWord or QWord registry key data is provided in a hexadecimal format. Not valid for types other than DWord and QWord. The default value is $false.")] Boolean Hex;
+ [Write, Description("Specifies whether or not to overwrite the specified registry key value if it already has a value or whether or not to delete a registry key that has subkeys. The default value is $false.")] Boolean Force;
+};
diff --git a/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.schema.mfl b/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.schema.mfl
index 6d08b1cdc..fc90c9bec 100644
--- a/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.schema.mfl
+++ b/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.schema.mfl
@@ -1,11 +1,11 @@
-[Description("Provides a mechanism to manage registry keys and values on a target node.") : Amended,AMENDMENT, LOCALE("MS_409")]
-class MSFT_xRegistryResource : OMI_BaseResource
-{
- [Key,Description("The path of the registry key to add, modify, or remove. This path must include the registry hive/drive.") : Amended] String Key;
- [Key,Description("The name of the registry value. To add or remove a registry key, specify this property as an empty string without specifying ValueType or ValueData. To modify or remove the default value of a registry key, specify this property as an empty string while also specifying ValueType or ValueData.") : Amended] String ValueName;
- [Description("The data the specified registry key value should have as a string or an array of strings (MultiString only).") : Amended] String ValueData[];
- [Description("The type the specified registry key value should have.") : Amended] String ValueType;
- [Description("Specifies whether or not the registry key or value should exist. To add or modify a registry key or value, set this property to Present. To remove a registry key or value, set the property to Absent.") : Amended] String Ensure;
- [Description("Specifies whether or not the specified DWord or QWord registry key data is provided in a hexadecimal format. Not valid for types other than DWord and QWord. The default value is $false.") : Amended] Boolean Hex;
- [Description("Specifies whether or not to overwrite the specified registry key value if it already has a value or whether or not to delete a registry key that has subkeys. The default value is $false.") : Amended] Boolean Force;
-};
+[Description("Provides a mechanism to manage registry keys and values on a target node.") : Amended,AMENDMENT, LOCALE("MS_409")]
+class MSFT_xRegistryResource : OMI_BaseResource
+{
+ [Key,Description("The path of the registry key to add, modify, or remove. This path must include the registry hive/drive.") : Amended] String Key;
+ [Key,Description("The name of the registry value. To add or remove a registry key, specify this property as an empty string without specifying ValueType or ValueData. To modify or remove the default value of a registry key, specify this property as an empty string while also specifying ValueType or ValueData.") : Amended] String ValueName;
+ [Description("The data the specified registry key value should have as a string or an array of strings (MultiString only).") : Amended] String ValueData[];
+ [Description("The type the specified registry key value should have.") : Amended] String ValueType;
+ [Description("Specifies whether or not the registry key or value should exist. To add or modify a registry key or value, set this property to Present. To remove a registry key or value, set the property to Absent.") : Amended] String Ensure;
+ [Description("Specifies whether or not the specified DWord or QWord registry key data is provided in a hexadecimal format. Not valid for types other than DWord and QWord. The default value is $false.") : Amended] Boolean Hex;
+ [Description("Specifies whether or not to overwrite the specified registry key value if it already has a value or whether or not to delete a registry key that has subkeys. The default value is $false.") : Amended] Boolean Force;
+};
diff --git a/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.strings.psd1 b/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.strings.psd1
index e300f3e64..41e70be8b 100644
--- a/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.strings.psd1
+++ b/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.strings.psd1
@@ -1,38 +1,38 @@
-# Localized resources for MSFT_xRegistryResource
-
-ConvertFrom-StringData @'
- DefaultValueDisplayName = (Default)
-
- GetTargetResourceStartMessage = Get-TargetResource is starting for Registry resource with Key {0}
- GetTargetResourceEndMessage = Get-TargetResource has finished for Registry resource with Key {0}
- RegistryKeyDoesNotExist = The registry key at path {0} does not exist.
- RegistryKeyExists = The registry key at path {0} exists.
- RegistryKeyValueDoesNotExist = The registry key at path {0} does not have a value named {1}.
- RegistryKeyValueExists = The registry key at path {0} has a value named {1}.
-
- SetTargetResourceStartMessage = Set-TargetResource is starting for Registry resource with Key {0}
- SetTargetResourceEndMessage = Set-TargetResource has finished for Registry resource with Key {0}
- CreatingRegistryKey = Creating registry key at path {0}...
- SettingRegistryKeyValue = Setting the value {0} under the registry key at path {1}...
- OverwritingRegistryKeyValue = Overwriting the value {0} under the registry key at path {1}...
- RemovingRegistryKey = Removing registry key at path {0}...
- RegistryKeyValueAlreadySet = The value {0} under the registry key at path {1} has already been set to the specified value.
- RemovingRegistryKeyValue = Removing the value {0} from the registry key at path {1}...
-
- TestTargetResourceStartMessage = Test-TargetResource is starting for Registry resource with Key {0}
- TestTargetResourceEndMessage = Test-TargetResource has finished for Registry resource with Key {0}
- RegistryKeyValueTypeDoesNotMatch = The type of the value {0} under the registry key at path {1} does not match the expected type. Expected {2} but was {3}.
- RegistryKeyValueDoesNotMatch = The value {0} under the registry key at path {1} does not match the expected value. Expected {2} but was {3}.
-
- CannotRemoveExistingRegistryKeyWithSubKeysWithoutForce = The registry key at path {0} has subkeys. To remove this registry key please specifiy the Force parameter as $true.
- CannotOverwriteExistingRegistryKeyValueWithoutForce = The registry key at path {0} already has a value with the name {1}. To overwrite this registry key value please specifiy the Force parameter as $true.
- CannotRemoveExistingRegistryKeyValueWithoutForce = The registry key at path {0} already has a value with the name {1}. To remove this registry key value please specifiy the Force parameter as $true.
- RegistryDriveInvalid = The registry drive specified in the registry key path {0} is missing or invalid.
- ArrayNotAllowedForExpectedType = The specified value data has been declared as a string array, but the registry key type {0} cannot be converted from an array. Please declare the value data as only one string or use the registry type MultiString.
- DWordDataNotInHexFormat = The specified registry key value data {0} is not in the correct hex format to parse as an Int32 (dword).
- QWordDataNotInHexFormat = The specified registry key value data {0} is not in the correct hex format to parse as an Int64 (qword).
- BinaryDataNotInHexFormat = The specified registry key value data {0} is not in the correct hex format to parse as a Byte array (Binary).
- InvalidRegistryDrive = The registry drive {0} is invalid. Please update the Key parameter to include a valid registry drive.
- InvalidRegistryDriveAbbreviation = The registry drive abbreviation {0} is invalid. Please update the Key parameter to include a valid registry drive.
- RegistryDriveCouldNotBeMounted = The registry drive with the abbreviation {0} could not be mounted.
-'@
+# Localized resources for MSFT_xRegistryResource
+
+ConvertFrom-StringData @'
+ DefaultValueDisplayName = (Default)
+
+ GetTargetResourceStartMessage = Get-TargetResource is starting for Registry resource with Key {0}
+ GetTargetResourceEndMessage = Get-TargetResource has finished for Registry resource with Key {0}
+ RegistryKeyDoesNotExist = The registry key at path {0} does not exist.
+ RegistryKeyExists = The registry key at path {0} exists.
+ RegistryKeyValueDoesNotExist = The registry key at path {0} does not have a value named {1}.
+ RegistryKeyValueExists = The registry key at path {0} has a value named {1}.
+
+ SetTargetResourceStartMessage = Set-TargetResource is starting for Registry resource with Key {0}
+ SetTargetResourceEndMessage = Set-TargetResource has finished for Registry resource with Key {0}
+ CreatingRegistryKey = Creating registry key at path {0}...
+ SettingRegistryKeyValue = Setting the value {0} under the registry key at path {1}...
+ OverwritingRegistryKeyValue = Overwriting the value {0} under the registry key at path {1}...
+ RemovingRegistryKey = Removing registry key at path {0}...
+ RegistryKeyValueAlreadySet = The value {0} under the registry key at path {1} has already been set to the specified value.
+ RemovingRegistryKeyValue = Removing the value {0} from the registry key at path {1}...
+
+ TestTargetResourceStartMessage = Test-TargetResource is starting for Registry resource with Key {0}
+ TestTargetResourceEndMessage = Test-TargetResource has finished for Registry resource with Key {0}
+ RegistryKeyValueTypeDoesNotMatch = The type of the value {0} under the registry key at path {1} does not match the expected type. Expected {2} but was {3}.
+ RegistryKeyValueDoesNotMatch = The value {0} under the registry key at path {1} does not match the expected value. Expected {2} but was {3}.
+
+ CannotRemoveExistingRegistryKeyWithSubKeysWithoutForce = The registry key at path {0} has subkeys. To remove this registry key please specifiy the Force parameter as $true.
+ CannotOverwriteExistingRegistryKeyValueWithoutForce = The registry key at path {0} already has a value with the name {1}. To overwrite this registry key value please specifiy the Force parameter as $true.
+ CannotRemoveExistingRegistryKeyValueWithoutForce = The registry key at path {0} already has a value with the name {1}. To remove this registry key value please specifiy the Force parameter as $true.
+ RegistryDriveInvalid = The registry drive specified in the registry key path {0} is missing or invalid.
+ ArrayNotAllowedForExpectedType = The specified value data has been declared as a string array, but the registry key type {0} cannot be converted from an array. Please declare the value data as only one string or use the registry type MultiString.
+ DWordDataNotInHexFormat = The specified registry key value data {0} is not in the correct hex format to parse as an Int32 (dword).
+ QWordDataNotInHexFormat = The specified registry key value data {0} is not in the correct hex format to parse as an Int64 (qword).
+ BinaryDataNotInHexFormat = The specified registry key value data {0} is not in the correct hex format to parse as a Byte array (Binary).
+ InvalidRegistryDrive = The registry drive {0} is invalid. Please update the Key parameter to include a valid registry drive.
+ InvalidRegistryDriveAbbreviation = The registry drive abbreviation {0} is invalid. Please update the Key parameter to include a valid registry drive.
+ RegistryDriveCouldNotBeMounted = The registry drive with the abbreviation {0} could not be mounted.
+'@
diff --git a/DSCResources/MSFT_xScriptResource/MSFT_xScriptResource.schema.mof b/DSCResources/MSFT_xScriptResource/MSFT_xScriptResource.schema.mof
index 321232a08..efff0030a 100644
--- a/DSCResources/MSFT_xScriptResource/MSFT_xScriptResource.schema.mof
+++ b/DSCResources/MSFT_xScriptResource/MSFT_xScriptResource.schema.mof
@@ -1,10 +1,10 @@
-
-[ClassVersion("1.0.0"),FriendlyName("xScript")]
-class MSFT_xScriptResource : OMI_BaseResource
-{
- [Key, Description("A string that can be used to create a PowerShell script block that retrieves the current state of the resource.")] String GetScript;
- [Key, Description("A string that can be used to create a PowerShell script block that sets the resource to the desired state.")] String SetScript;
- [Key, Description("A string that can be used to create a PowerShell script block that validates whether or not the resource is in the desired state.")] String TestScript;
- [Write, EmbeddedInstance("MSFT_Credential"), Description("The credential of the user account to run the script under if needed.")] String Credential;
- [Read, Description("The result from the GetScript script block.")] String Result;
-};
+
+[ClassVersion("1.0.0"),FriendlyName("xScript")]
+class MSFT_xScriptResource : OMI_BaseResource
+{
+ [Key, Description("A string that can be used to create a PowerShell script block that retrieves the current state of the resource.")] String GetScript;
+ [Key, Description("A string that can be used to create a PowerShell script block that sets the resource to the desired state.")] String SetScript;
+ [Key, Description("A string that can be used to create a PowerShell script block that validates whether or not the resource is in the desired state.")] String TestScript;
+ [Write, EmbeddedInstance("MSFT_Credential"), Description("The credential of the user account to run the script under if needed.")] String Credential;
+ [Read, Description("The result from the GetScript script block.")] String Result;
+};
diff --git a/DSCResources/MSFT_xScriptResource/en-US/MSFT_xScriptResource.strings.psd1 b/DSCResources/MSFT_xScriptResource/en-US/MSFT_xScriptResource.strings.psd1
index c6e357706..b23ee6999 100644
--- a/DSCResources/MSFT_xScriptResource/en-US/MSFT_xScriptResource.strings.psd1
+++ b/DSCResources/MSFT_xScriptResource/en-US/MSFT_xScriptResource.strings.psd1
@@ -1,16 +1,16 @@
-# Localized MSFT_xScriptResource.strings.psd1
-
-ConvertFrom-StringData @'
- GetTargetResourceStartVerboseMessage = Begin executing get script.
- GetScriptThrewError = The get script threw an error.
- GetScriptDidNotReturnHashtable = The get script did not return a hashtable.
- GetTargetResourceEndVerboseMessage = End executing get script.
- SetTargetResourceStartVerboseMessage = Begin executing set script.
- SetScriptThrewError = The set script threw an error.
- SetTargetResourceEndVerboseMessage = End executing set script.
- TestTargetResourceStartVerboseMessage = Begin executing test script.
- TestScriptThrewError = The test script threw an error.
- TestScriptDidNotReturnBoolean = The test script did not return a boolean.
- TestTargetResourceEndVerboseMessage = End executing test script.
- ExecutingScriptMessage = Executing script: {0}
-'@
+# Localized MSFT_xScriptResource.strings.psd1
+
+ConvertFrom-StringData @'
+ GetTargetResourceStartVerboseMessage = Begin executing get script.
+ GetScriptThrewError = The get script threw an error.
+ GetScriptDidNotReturnHashtable = The get script did not return a hashtable.
+ GetTargetResourceEndVerboseMessage = End executing get script.
+ SetTargetResourceStartVerboseMessage = Begin executing set script.
+ SetScriptThrewError = The set script threw an error.
+ SetTargetResourceEndVerboseMessage = End executing set script.
+ TestTargetResourceStartVerboseMessage = Begin executing test script.
+ TestScriptThrewError = The test script threw an error.
+ TestScriptDidNotReturnBoolean = The test script did not return a boolean.
+ TestTargetResourceEndVerboseMessage = End executing test script.
+ ExecutingScriptMessage = Executing script: {0}
+'@
diff --git a/DSCResources/MSFT_xServiceResource/MSFT_xServiceResource.schema.mof b/DSCResources/MSFT_xServiceResource/MSFT_xServiceResource.schema.mof
index 316f9b7c7..80149af8c 100644
--- a/DSCResources/MSFT_xServiceResource/MSFT_xServiceResource.schema.mof
+++ b/DSCResources/MSFT_xServiceResource/MSFT_xServiceResource.schema.mof
@@ -1,19 +1,19 @@
-
-[ClassVersion("1.0.0"),FriendlyName("xService")]
-class MSFT_xServiceResource : OMI_BaseResource
-{
- [Key,Description("Indicates the service name. Note that sometimes this is different from the display name. You can get a list of the services and their current state with the Get-Service cmdlet.")] String Name;
- [Write,Description("Ensures that the service is present or absent. Defaults to Present."),ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure;
- [Write,Description("The path to the service executable file.")] String Path;
- [Write,Description("Indicates the startup type for the service."),ValueMap{"Automatic", "Manual", "Disabled"},Values{"Automatic", "Manual", "Disabled"}] String StartupType;
- [Write,Description("Indicates the sign-in account to use for the service."),ValueMap{"LocalSystem", "LocalService", "NetworkService"},Values{"LocalSystem", "LocalService", "NetworkService"}] String BuiltInAccount;
- [Write,Description("The Group Managed Service Account to run the service under.")] String GroupManagedServiceAccount;
- [Write,Description("The credential to run the service under."),EmbeddedInstance("MSFT_Credential")] String Credential;
- [Write,Description("The service can create or communicate with a window on the desktop. Must be false for services not running as LocalSystem. Defaults to False.")] Boolean DesktopInteract;
- [Write,Description("Indicates the state you want to ensure for the service. Defaults to Running."),ValueMap{"Running", "Stopped", "Ignore"},Values{"Running", "Stopped", "Ignore"}] String State;
- [Write,Description("The display name of the service.")] String DisplayName;
- [Write,Description("The description of the service.")] String Description;
- [Write,Description("An array of strings indicating the names of the dependencies of the service.")] String Dependencies[];
- [Write,Description("The time to wait for the service to start in milliseconds. Defaults to 30000.")] uint32 StartupTimeout;
- [Write,Description("The time to wait for the service to stop in milliseconds. Defaults to 30000.")] uint32 TerminateTimeout;
-};
+
+[ClassVersion("1.0.0"),FriendlyName("xService")]
+class MSFT_xServiceResource : OMI_BaseResource
+{
+ [Key,Description("Indicates the service name. Note that sometimes this is different from the display name. You can get a list of the services and their current state with the Get-Service cmdlet.")] String Name;
+ [Write,Description("Ensures that the service is present or absent. Defaults to Present."),ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure;
+ [Write,Description("The path to the service executable file.")] String Path;
+ [Write,Description("Indicates the startup type for the service."),ValueMap{"Automatic", "Manual", "Disabled"},Values{"Automatic", "Manual", "Disabled"}] String StartupType;
+ [Write,Description("Indicates the sign-in account to use for the service."),ValueMap{"LocalSystem", "LocalService", "NetworkService"},Values{"LocalSystem", "LocalService", "NetworkService"}] String BuiltInAccount;
+ [Write,Description("The Group Managed Service Account to run the service under.")] String GroupManagedServiceAccount;
+ [Write,Description("The credential to run the service under."),EmbeddedInstance("MSFT_Credential")] String Credential;
+ [Write,Description("The service can create or communicate with a window on the desktop. Must be false for services not running as LocalSystem. Defaults to False.")] Boolean DesktopInteract;
+ [Write,Description("Indicates the state you want to ensure for the service. Defaults to Running."),ValueMap{"Running", "Stopped", "Ignore"},Values{"Running", "Stopped", "Ignore"}] String State;
+ [Write,Description("The display name of the service.")] String DisplayName;
+ [Write,Description("The description of the service.")] String Description;
+ [Write,Description("An array of strings indicating the names of the dependencies of the service.")] String Dependencies[];
+ [Write,Description("The time to wait for the service to start in milliseconds. Defaults to 30000.")] uint32 StartupTimeout;
+ [Write,Description("The time to wait for the service to stop in milliseconds. Defaults to 30000.")] uint32 TerminateTimeout;
+};
diff --git a/DSCResources/MSFT_xWindowsFeature/MSFT_xWindowsFeature.schema.mof b/DSCResources/MSFT_xWindowsFeature/MSFT_xWindowsFeature.schema.mof
index 579850ed8..6fb1a8a29 100644
--- a/DSCResources/MSFT_xWindowsFeature/MSFT_xWindowsFeature.schema.mof
+++ b/DSCResources/MSFT_xWindowsFeature/MSFT_xWindowsFeature.schema.mof
@@ -1,11 +1,11 @@
-
-[ClassVersion("1.0.0.0"), FriendlyName("xWindowsFeature")]
-class MSFT_xWindowsFeature : OMI_BaseResource
-{
- [Key, Description("The name of the role or feature to install or uninstall.")] String Name;
- [Write, Description("Specifies whether the role or feature should be installed or uninstalled. To install the feature, set this property to Present. To uninstall the feature, set the property to Absent."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure;
- [Write, Description("Specifies whether the subfeatures of the main feature should also be installed.")] Boolean IncludeAllSubFeature;
- [Write, Description("The path to the log file to log this operation.")] String LogPath;
- [Write, Description("A credential, if needed, to install or uninstall the role or feature."), EmbeddedInstance("MSFT_Credential")] String Credential;
- [Read, Description("The display name of the retrieved role or feature.")] String DisplayName;
-};
+
+[ClassVersion("1.0.0.0"), FriendlyName("xWindowsFeature")]
+class MSFT_xWindowsFeature : OMI_BaseResource
+{
+ [Key, Description("The name of the role or feature to install or uninstall.")] String Name;
+ [Write, Description("Specifies whether the role or feature should be installed or uninstalled. To install the feature, set this property to Present. To uninstall the feature, set the property to Absent."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure;
+ [Write, Description("Specifies whether the subfeatures of the main feature should also be installed.")] Boolean IncludeAllSubFeature;
+ [Write, Description("The path to the log file to log this operation.")] String LogPath;
+ [Write, Description("A credential, if needed, to install or uninstall the role or feature."), EmbeddedInstance("MSFT_Credential")] String Credential;
+ [Read, Description("The display name of the retrieved role or feature.")] String DisplayName;
+};
diff --git a/DSCResources/MSFT_xWindowsFeature/en-US/MSFT_xWindowsFeature.strings.psd1 b/DSCResources/MSFT_xWindowsFeature/en-US/MSFT_xWindowsFeature.strings.psd1
index 87837cdf9..d60b37776 100644
--- a/DSCResources/MSFT_xWindowsFeature/en-US/MSFT_xWindowsFeature.strings.psd1
+++ b/DSCResources/MSFT_xWindowsFeature/en-US/MSFT_xWindowsFeature.strings.psd1
@@ -1,23 +1,23 @@
-# Localized strings for MSFT_xWindowsFeature.psd1
-
-ConvertFrom-StringData @'
- FeatureNotFoundError = The requested feature {0} could not be found on the target machine.
- MultipleFeatureInstancesError = Failure to get the requested feature {0} information from the target machine. Wildcard pattern is not supported in the feature name.
- FeatureInstallationFailureError = Failure to successfully install the feature {0} .
- FeatureUninstallationFailureError = Failure to successfully uninstall the feature {0} .
- QueryFeature = Querying for feature {0} using Server Manager cmdlet Get-WindowsFeature.
- InstallFeature = Trying to install feature {0} using Server Manager cmdlet Add-WindowsFeature.
- UninstallFeature = Trying to uninstall feature {0} using Server Manager cmdlet Remove-WindowsFeature.
- RestartNeeded = The Target machine needs to be restarted.
- GetTargetResourceStartMessage = Begin executing Get functionality on the {0} feature.
- GetTargetResourceEndMessage = End executing Get functionality on the {0} feature.
- SetTargetResourceStartMessage = Begin executing Set functionality on the {0} feature.
- SetTargetResourceEndMessage = End executing Set functionality on the {0} feature.
- TestTargetResourceStartMessage = Begin executing Test functionality on the {0} feature.
- TestTargetResourceEndMessage = End executing Test functionality on the {0} feature.
- ServerManagerModuleNotFoundMessage = ServerManager module is not installed on the machine.
- SkuNotSupported = Installing roles and features using PowerShell Desired State Configuration is supported only on Server SKU's. It is not supported on Client SKU.
- EnableServerManagerPSHCmdletsFeature = Windows Server 2008R2 Core operating system detected: ServerManager-PSH-Cmdlets feature has been enabled.
- UninstallSuccess = Successfully uninstalled the feature {0}.
- InstallSuccess = Successfully installed the feature {0}.
-'@
+# Localized strings for MSFT_xWindowsFeature.psd1
+
+ConvertFrom-StringData @'
+ FeatureNotFoundError = The requested feature {0} could not be found on the target machine.
+ MultipleFeatureInstancesError = Failure to get the requested feature {0} information from the target machine. Wildcard pattern is not supported in the feature name.
+ FeatureInstallationFailureError = Failure to successfully install the feature {0} .
+ FeatureUninstallationFailureError = Failure to successfully uninstall the feature {0} .
+ QueryFeature = Querying for feature {0} using Server Manager cmdlet Get-WindowsFeature.
+ InstallFeature = Trying to install feature {0} using Server Manager cmdlet Add-WindowsFeature.
+ UninstallFeature = Trying to uninstall feature {0} using Server Manager cmdlet Remove-WindowsFeature.
+ RestartNeeded = The Target machine needs to be restarted.
+ GetTargetResourceStartMessage = Begin executing Get functionality on the {0} feature.
+ GetTargetResourceEndMessage = End executing Get functionality on the {0} feature.
+ SetTargetResourceStartMessage = Begin executing Set functionality on the {0} feature.
+ SetTargetResourceEndMessage = End executing Set functionality on the {0} feature.
+ TestTargetResourceStartMessage = Begin executing Test functionality on the {0} feature.
+ TestTargetResourceEndMessage = End executing Test functionality on the {0} feature.
+ ServerManagerModuleNotFoundMessage = ServerManager module is not installed on the machine.
+ SkuNotSupported = Installing roles and features using PowerShell Desired State Configuration is supported only on Server SKU's. It is not supported on Client SKU.
+ EnableServerManagerPSHCmdletsFeature = Windows Server 2008R2 Core operating system detected: ServerManager-PSH-Cmdlets feature has been enabled.
+ UninstallSuccess = Successfully uninstalled the feature {0}.
+ InstallSuccess = Successfully installed the feature {0}.
+'@
diff --git a/DSCResources/MSFT_xWindowsOptionalFeature/MSFT_xWindowsOptionalFeature.schema.mof b/DSCResources/MSFT_xWindowsOptionalFeature/MSFT_xWindowsOptionalFeature.schema.mof
index 05f30ecb5..b90aaa4a7 100644
--- a/DSCResources/MSFT_xWindowsOptionalFeature/MSFT_xWindowsOptionalFeature.schema.mof
+++ b/DSCResources/MSFT_xWindowsOptionalFeature/MSFT_xWindowsOptionalFeature.schema.mof
@@ -1,14 +1,14 @@
-
-[ClassVersion("1.0.0.0"), FriendlyName("xWindowsOptionalFeature")]
-class MSFT_xWindowsOptionalFeature : OMI_BaseResource
-{
- [Key, Description("The name of the feature to enable or disable.")] String Name;
- [Write, Description("Specifies whether the feature should be enabled or disabled. To enable the feature, set this property to Present. To disable the feature, set the property to Absent."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure;
- [Write, Description("Specifies that all files associated with the feature should be removed if the feature is being disabled.")] Boolean RemoveFilesOnDisable;
- [Write, Description("Specifies whether or not DISM contacts Windows Update (WU) when searching for the source files to enable the feature. If $true, DISM will not contact WU.")] Boolean NoWindowsUpdateCheck;
- [Write, Description("The maximum output level to show in the log. Accepted values are: ErrorsOnly (only errors are logged), ErrorsAndWarning (errors and warnings are logged), and ErrorsAndWarningAndInformation (errors, warnings, and debug information are logged)."), ValueMap{"ErrorsOnly", "ErrorsAndWarning", "ErrorsAndWarningAndInformation"}, Values{"ErrorsOnly", "ErrorsAndWarning", "ErrorsAndWarningAndInformation"}] String LogLevel;
- [Write, Description("The path to the log file to log this operation.")] String LogPath;
- [Read, Description("The custom properties retrieved from the Windows optional feature as an array of strings.")] String CustomProperties[];
- [Read, Description("The description retrieved from the Windows optional feature.")] String Description;
- [Read, Description("The display name retrieved from the Windows optional feature.")] String DisplayName;
-};
+
+[ClassVersion("1.0.0.0"), FriendlyName("xWindowsOptionalFeature")]
+class MSFT_xWindowsOptionalFeature : OMI_BaseResource
+{
+ [Key, Description("The name of the feature to enable or disable.")] String Name;
+ [Write, Description("Specifies whether the feature should be enabled or disabled. To enable the feature, set this property to Present. To disable the feature, set the property to Absent."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure;
+ [Write, Description("Specifies that all files associated with the feature should be removed if the feature is being disabled.")] Boolean RemoveFilesOnDisable;
+ [Write, Description("Specifies whether or not DISM contacts Windows Update (WU) when searching for the source files to enable the feature. If $true, DISM will not contact WU.")] Boolean NoWindowsUpdateCheck;
+ [Write, Description("The maximum output level to show in the log. Accepted values are: ErrorsOnly (only errors are logged), ErrorsAndWarning (errors and warnings are logged), and ErrorsAndWarningAndInformation (errors, warnings, and debug information are logged)."), ValueMap{"ErrorsOnly", "ErrorsAndWarning", "ErrorsAndWarningAndInformation"}, Values{"ErrorsOnly", "ErrorsAndWarning", "ErrorsAndWarningAndInformation"}] String LogLevel;
+ [Write, Description("The path to the log file to log this operation.")] String LogPath;
+ [Read, Description("The custom properties retrieved from the Windows optional feature as an array of strings.")] String CustomProperties[];
+ [Read, Description("The description retrieved from the Windows optional feature.")] String Description;
+ [Read, Description("The display name retrieved from the Windows optional feature.")] String DisplayName;
+};
diff --git a/DSCResources/MSFT_xWindowsPackageCab/MSFT_xWindowsPackageCab.schema.mof b/DSCResources/MSFT_xWindowsPackageCab/MSFT_xWindowsPackageCab.schema.mof
index cd7783029..6014eec8f 100644
--- a/DSCResources/MSFT_xWindowsPackageCab/MSFT_xWindowsPackageCab.schema.mof
+++ b/DSCResources/MSFT_xWindowsPackageCab/MSFT_xWindowsPackageCab.schema.mof
@@ -1,9 +1,9 @@
-
-[ClassVersion("1.0.0.0"), FriendlyName("xWindowsPackageCab")]
-class MSFT_xWindowsPackageCab : OMI_BaseResource
-{
- [Key, Description("The name of the package to install or uninstall.")] String Name;
- [Required, Description("Specifies whether the package should be installed or uninstalled. To install the package, set this property to Present. To uninstall the package, set the property to Absent."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure;
- [Required, Description("The path to the cab file to install or uninstall the package from.")] String SourcePath;
- [Write, Description("The path to a file to log the operation to.")] String LogPath;
-};
+
+[ClassVersion("1.0.0.0"), FriendlyName("xWindowsPackageCab")]
+class MSFT_xWindowsPackageCab : OMI_BaseResource
+{
+ [Key, Description("The name of the package to install or uninstall.")] String Name;
+ [Required, Description("Specifies whether the package should be installed or uninstalled. To install the package, set this property to Present. To uninstall the package, set the property to Absent."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure;
+ [Required, Description("The path to the cab file to install or uninstall the package from.")] String SourcePath;
+ [Write, Description("The path to a file to log the operation to.")] String LogPath;
+};
diff --git a/README.md b/README.md
index 1726ace35..f93767733 100644
--- a/README.md
+++ b/README.md
@@ -754,6 +754,8 @@ Publishes a 'FileInfo' object(s) to the pullserver configuration repository. It
* Fixes issue where Get-TargetResource or Test-TargetResource will throw an
exception if the target service is configured with a non-existent dependency.
* Refactored Get-TargetResource Unit tests.
+* Fixes files which are getting triggered for re-encoding after recent checkin
+ (possibly #472)
### 8.5.0.0