forked from dsccommunity/xPSDesiredStateConfiguration
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes files which are getting triggered for re-encoding after recent …
…checkin (possibly dsccommunity#472)
- Loading branch information
Showing
17 changed files
with
1,002 additions
and
1,000 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; |
Oops, something went wrong.