├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── 01_general.md │ ├── 02_resource_proposal.yml │ ├── 03_command_proposal.yml │ ├── 04_problem_with_resource.yml │ ├── 05_problem_with_command.yml │ └── config.yml ├── PULL_REQUEST_TEMPLATE.md └── stale.yml ├── .gitignore ├── .markdownlint.json ├── .vscode ├── analyzersettings.psd1 ├── settings.json └── tasks.json ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── GitVersion.yml ├── LICENSE ├── README.md ├── RequiredModules.psd1 ├── Resolve-Dependency.ps1 ├── Resolve-Dependency.psd1 ├── azure-pipelines.yml ├── build.ps1 ├── build.yaml ├── codecov.yml ├── source ├── Classes │ ├── 001.DnsServerReason.ps1 │ ├── 012.ResourcePropertiesBase.ps1 │ ├── 015.DnsRecordBase.ps1 │ ├── 020.DnsRecordCname.ps1 │ ├── 020.DnsRecordPtr.ps1 │ ├── 030.DnsRecordA.ps1 │ ├── 030.DnsRecordAaaa.ps1 │ ├── 030.DnsRecordMx.ps1 │ ├── 030.DnsRecordNs.ps1 │ ├── 030.DnsRecordSrv.ps1 │ ├── 030.DnsServerCache.ps1 │ ├── 030.DnsServerDsSetting.ps1 │ ├── 030.DnsServerEDns.ps1 │ ├── 030.DnsServerRecursion.ps1 │ ├── 030.DnsServerScavenging.ps1 │ ├── 040.DnsRecordAScoped.ps1 │ ├── 040.DnsRecordAaaaScoped.ps1 │ ├── 040.DnsRecordCnameScoped.ps1 │ ├── 040.DnsRecordMxScoped.ps1 │ ├── 040.DnsRecordNsScoped.ps1 │ └── 040.DnsRecordSrvScoped.ps1 ├── DSCResources │ ├── DSC_DnsServerADZone │ │ ├── DSC_DnsServerADZone.psm1 │ │ ├── DSC_DnsServerADZone.schema.mof │ │ ├── README.md │ │ └── en-US │ │ │ └── DSC_DnsServerADZone.strings.psd1 │ ├── DSC_DnsServerClientSubnet │ │ ├── DSC_DnsServerClientSubnet.psm1 │ │ ├── DSC_DnsServerClientSubnet.schema.mof │ │ ├── README.md │ │ └── en-US │ │ │ └── DSC_DnsServerClientSubnet.strings.psd1 │ ├── DSC_DnsServerConditionalForwarder │ │ ├── DSC_DnsServerConditionalForwarder.psm1 │ │ ├── DSC_DnsServerConditionalForwarder.schema.mof │ │ ├── README.md │ │ └── en-US │ │ │ └── DSC_DnsServerConditionalForwarder.strings.psd1 │ ├── DSC_DnsServerDiagnostics │ │ ├── DSC_DnsServerDiagnostics.psm1 │ │ ├── DSC_DnsServerDiagnostics.schema.mof │ │ ├── README.md │ │ └── en-US │ │ │ └── DSC_DnsServerDiagnostics.strings.psd1 │ ├── DSC_DnsServerForwarder │ │ ├── DSC_DnsServerForwarder.psm1 │ │ ├── DSC_DnsServerForwarder.schema.mof │ │ ├── README.md │ │ └── en-US │ │ │ └── DSC_DnsServerForwarder.strings.psd1 │ ├── DSC_DnsServerPrimaryZone │ │ ├── DSC_DnsServerPrimaryZone.psm1 │ │ ├── DSC_DnsServerPrimaryZone.schema.mof │ │ ├── README.md │ │ └── en-US │ │ │ └── DSC_DnsServerPrimaryZone.strings.psd1 │ ├── DSC_DnsServerRootHint │ │ ├── DSC_DnsServerRootHint.psm1 │ │ ├── DSC_DnsServerRootHint.schema.mof │ │ ├── README.md │ │ └── en-US │ │ │ └── DSC_DnsServerRootHint.strings.psd1 │ ├── DSC_DnsServerSecondaryZone │ │ ├── DSC_DnsServerSecondaryZone.psm1 │ │ ├── DSC_DnsServerSecondaryZone.schema.mof │ │ ├── README.md │ │ └── en-US │ │ │ └── DSC_DnsServerSecondaryZone.strings.psd1 │ ├── DSC_DnsServerSetting │ │ ├── DSC_DnsServerSetting.psm1 │ │ ├── DSC_DnsServerSetting.schema.mof │ │ ├── README.md │ │ └── en-US │ │ │ └── DSC_DnsServerSetting.strings.psd1 │ ├── DSC_DnsServerSettingLegacy │ │ ├── DSC_DnsServerSettingLegacy.psm1 │ │ ├── DSC_DnsServerSettingLegacy.schema.mof │ │ ├── README.md │ │ └── en-US │ │ │ └── DSC_DnsServerSettingLegacy.strings.psd1 │ ├── DSC_DnsServerZoneAging │ │ ├── DSC_DnsServerZoneAging.psm1 │ │ ├── DSC_DnsServerZoneAging.schema.mof │ │ ├── README.md │ │ └── en-US │ │ │ └── DSC_DnsServerZoneAging.strings.psd1 │ ├── DSC_DnsServerZoneScope │ │ ├── DSC_DnsServerZoneScope.psm1 │ │ ├── DSC_DnsServerZoneScope.schema.mof │ │ ├── README.md │ │ └── en-US │ │ │ └── DSC_DnsServerZoneScope.strings.psd1 │ └── DSC_DnsServerZoneTransfer │ │ ├── DSC_DnsServerZoneTransfer.psm1 │ │ ├── DSC_DnsServerZoneTransfer.schema.mof │ │ ├── README.md │ │ └── en-US │ │ └── DSC_DnsServerZoneTransfer.strings.psd1 ├── DnsServerDsc.psd1 ├── Enum │ └── 1.Ensure.ps1 ├── Examples │ └── Resources │ │ ├── DnsRecordA │ │ ├── 1-DnsRecordA_Mandatory_config.ps1 │ │ ├── 2-DnsRecordA_Full_config.ps1 │ │ └── 3-DnsRecordA_Remove_config.ps1 │ │ ├── DnsRecordAScoped │ │ ├── 1-DnsRecordAScoped_Mandatory_config.ps1 │ │ ├── 2-DnsRecordAScoped_Full_config.ps1 │ │ └── 3-DnsRecordAScoped_Remove_config.ps1 │ │ ├── DnsRecordAaaa │ │ ├── 1-DnsRecordAaaa_Mandatory_config.ps1 │ │ ├── 2-DnsRecordAaaa_Full_config.ps1 │ │ └── 3-DnsRecordAaaa_Remove_config.ps1 │ │ ├── DnsRecordAaaaScoped │ │ ├── 1-DnsRecordAaaaScoped_Mandatory_config.ps1 │ │ ├── 2-DnsRecordAaaaScoped_Full_config.ps1 │ │ └── 3-DnsRecordAaaaScoped_Remove_config.ps1 │ │ ├── DnsRecordCNAME │ │ ├── 1-DnsRecordCname_Mandatory_config.ps1 │ │ ├── 2-DnsRecordCname_Full_config.ps1 │ │ └── 3-DnsRecordCname_Remove_config.ps1 │ │ ├── DnsRecordCNAMEScoped │ │ ├── 1-DnsRecordCnameScoped_Mandatory_config.ps1 │ │ ├── 2-DnsRecordCnameScoped_Full_config.ps1 │ │ └── 3-DnsRecordCnameScoped_Remove_config.ps1 │ │ ├── DnsRecordMx │ │ ├── 1-DnsRecordMx_Mandatory_config.ps1 │ │ ├── 2-DnsRecordMx_Full_config.ps1 │ │ └── 3-DnsRecordMx_Remove_config.ps1 │ │ ├── DnsRecordMxScoped │ │ ├── 1-DnsRecordMxScoped_Mandatory_config.ps1 │ │ ├── 2-DnsRecordMxScoped_Full_config.ps1 │ │ └── 3-DnsRecordMxScoped_Remove_config.ps1 │ │ ├── DnsRecordNs │ │ ├── 1-DnsRecordNs_Mandatory_config.ps1 │ │ ├── 2-DnsRecordNs_Full_config.ps1 │ │ └── 3-DnsRecordNs_Remove_config.ps1 │ │ ├── DnsRecordNsScoped │ │ ├── 1-DnsRecordNsScoped_Mandatory_config.ps1 │ │ ├── 2-DnsRecordNsScoped_Full_config.ps1 │ │ └── 3-DnsRecordNsScoped_Remove_config.ps1 │ │ ├── DnsRecordPtr │ │ ├── 1-DnsRecordPtr_Mandatory_config.ps1 │ │ ├── 2-DnsRecordPtr_Full_config.ps1 │ │ ├── 3-DnsRecordPtr_Remove_config.ps1 │ │ ├── 4-DnsRecordPtr_Mandatory_v6_config.ps1 │ │ ├── 5-DnsRecordPtr_Full_v6_config.ps1 │ │ └── 6-DnsRecordPtr_Remove_v6_config.ps1 │ │ ├── DnsRecordSrv │ │ ├── 1-DnsRecordSrv_config.ps1 │ │ ├── 2-DnsRecordSrv_full_config.ps1 │ │ └── 3-DnsRecordSrv_Remove_config.ps1 │ │ ├── DnsRecordSrvScoped │ │ ├── 1-DnsRecordSrvScoped_config.ps1 │ │ ├── 2-DnsRecordSrvScoped_full_config.ps1 │ │ └── 3-DnsRecordSrvScoped_Remove_config.ps1 │ │ ├── DnsServerADZone │ │ ├── 1-DnsServerADZone_forward_config.ps1 │ │ └── 2-DnsServerADZone_reverse_config.ps1 │ │ ├── DnsServerCache │ │ └── 1-DnsServerCache_SetCacheSettings_Config.ps1 │ │ ├── DnsServerClientSubnet │ │ └── 1-DnsServerClientSubnet_config.ps1 │ │ ├── DnsServerConditionalForwarder │ │ └── 1-DnsServerConditionalForwarder_config.ps1 │ │ ├── DnsServerDiagnostics │ │ ├── 1-DnsServerDiagnostics_CurrentNode_Config.ps1 │ │ └── 2-DnsServerDiagnostics_RemoteNode_Config.ps1 │ │ ├── DnsServerDsSetting │ │ ├── 1-DnsServerDsSetting_DirectoryPartitionAutoEnlistInterval_Config.ps1 │ │ ├── 2-DnsServerDsSetting_LazyUpdateInterval_Config.ps1 │ │ ├── 3-DnsServerDsSetting_MinimumBackgroundLoadThreads_Config.ps1 │ │ ├── 4-DnsServerDsSetting_PollingInterval_Config.ps1 │ │ ├── 5-DnsServerDsSetting_RemoteReplicationDelay_Config.ps1 │ │ ├── 6-DnsServerDsSetting_TombstoneInterval_Config.ps1 │ │ └── 7-DnsServerDsSetting_All_Config.ps1 │ │ ├── DnsServerEDns │ │ ├── 1-DnsServerEDns_SetCacheTimeout_Config.ps1 │ │ ├── 2-DnsServerEDns_EnableProbes_Config.ps1 │ │ └── 3-DnsServerEDns_EnableReception_Config.ps1 │ │ ├── DnsServerForwarder │ │ ├── 1-DnsServerForwarder_set_config.ps1 │ │ ├── 2-DnsServerForwarder_remove_config.ps1 │ │ ├── 3-DnsServerForwarder_SetUseRootHint_Config.ps1 │ │ ├── 4-DnsServerForwarder_EnableReordering_Config.ps1 │ │ ├── 5-DnsServerForwarder_DisableReordering_Config.ps1 │ │ └── 6-DnsServerForwarder_SetTimeout_Config.ps1 │ │ ├── DnsServerPrimaryZone │ │ ├── 1-DnsServerPrimaryZone_AddClassfulReversePrimaryZone_Config.ps1 │ │ ├── 2-DnsServerPrimaryZone_AddClasslessReversePrimaryZone_Config.ps1 │ │ ├── 3-DnsServerPrimaryZone_AddPrimaryZoneUsingDefaults_Config.ps1 │ │ ├── 4-DnsServerPrimaryZone_AddPrimaryZoneWithSpecificValues_Config.ps1 │ │ ├── 5-DnsServerPrimaryZone_RemovePrimaryZone_Config.ps1 │ │ └── 6-DnsServerPrimaryZone_RemoveReversePrimaryZone_Config.ps1 │ │ ├── DnsServerRootHint │ │ ├── 1-DnsServerRootHint_set_config.ps1 │ │ └── 2-DnsServerRootHint_remove_config.ps1 │ │ ├── DnsServerScavenging │ │ ├── 1-DnsServerScavenging_EnableAndChangeScavengingIntervals_Config.ps1 │ │ ├── 2-DnsServerScavenging_EnableScavenging_Config.ps1 │ │ ├── 3-DnsServerScavenging_ChangeScavengingIntervals_Config.ps1 │ │ └── 4-DnsServerScavenging_DisableScavenging_Config.ps1 │ │ ├── DnsServerSecondaryZone │ │ └── 1-DnsServerSecondaryZone_config.ps1 │ │ ├── DnsServerSetting │ │ ├── 1-DnsServerSetting_CurrentNode_Config.ps1 │ │ └── 2-DnsServerSetting_RemoteNode_Config.ps1 │ │ ├── DnsServerSettingLegacy │ │ ├── 1-DnsServerSettingLegacy_CurrentNode_Config.ps1 │ │ └── 2-DnsServerSettingLegacy_RemoteNode_Config.ps1 │ │ ├── DnsServerZoneAging │ │ ├── 1-DnsServerZoneAging_forward_config.ps1 │ │ └── 2-DnsServerZoneAging_reverse_config.ps1 │ │ ├── DnsServerZoneScope │ │ └── 1-DnsServerZoneScope_config.ps1 │ │ ├── DnsServerZoneTransfer │ │ └── 1-DnsServerZoneTransfer_config.ps1 │ │ └── DsnRecordRecursion │ │ └── 1-DnsServerRecursion_SetRecursionSettings_Config.ps1 ├── Modules │ └── DnsServerDsc.Common │ │ ├── DnsServerDsc.Common.psd1 │ │ ├── DnsServerDsc.Common.psm1 │ │ └── en-US │ │ └── DnsServerDsc.Common.strings.psd1 ├── Private │ ├── Assert-TimeSpan.ps1 │ └── ConvertTo-TimeSpan.ps1 ├── WikiSource │ └── Home.md ├── build.psd1 ├── en-US │ ├── DnsRecordA.strings.psd1 │ ├── DnsRecordAScoped.strings.psd1 │ ├── DnsRecordAaaa.strings.psd1 │ ├── DnsRecordAaaaScoped.strings.psd1 │ ├── DnsRecordBase.strings.psd1 │ ├── DnsRecordCname.strings.psd1 │ ├── DnsRecordCnameScoped.strings.psd1 │ ├── DnsRecordMx.strings.psd1 │ ├── DnsRecordMxScoped.strings.psd1 │ ├── DnsRecordNs.strings.psd1 │ ├── DnsRecordNsScoped.strings.psd1 │ ├── DnsRecordPtr.strings.psd1 │ ├── DnsRecordSrv.strings.psd1 │ ├── DnsRecordSrvScoped.strings.psd1 │ ├── DnsServerCache.strings.psd1 │ ├── DnsServerDsSetting.strings.psd1 │ ├── DnsServerDsc.strings.psd1 │ ├── DnsServerEDns.strings.psd1 │ ├── DnsServerRecursion.strings.psd1 │ ├── DnsServerScavenging.strings.psd1 │ ├── ResourcePropertiesBase.strings.psd1 │ └── about_DnsServerDsc.help.txt └── prefix.ps1 └── tests ├── Integration ├── Classes │ ├── DnsRecordA.config.ps1 │ ├── DnsRecordA.integration.tests.ps1 │ ├── DnsRecordAScoped.config.ps1 │ ├── DnsRecordAScoped.integration.tests.ps1 │ ├── DnsRecordAaaa.config.ps1 │ ├── DnsRecordAaaa.integration.tests.ps1 │ ├── DnsRecordAaaaScoped.config.ps1 │ ├── DnsRecordAaaaScoped.integration.tests.ps1 │ ├── DnsRecordCname.config.ps1 │ ├── DnsRecordCname.integration.tests.ps1 │ ├── DnsRecordCnameScoped.config.ps1 │ ├── DnsRecordCnameScoped.integration.tests.ps1 │ ├── DnsRecordMx.config.ps1 │ ├── DnsRecordMx.integration.tests.ps1 │ ├── DnsRecordMxScoped.config.ps1 │ ├── DnsRecordMxScoped.integration.tests.ps1 │ ├── DnsRecordNs.config.ps1 │ ├── DnsRecordNs.integration.tests.ps1 │ ├── DnsRecordNsScoped.config.ps1 │ ├── DnsRecordNsScoped.integration.tests.ps1 │ ├── DnsRecordPtr.config.ps1 │ ├── DnsRecordPtr.integration.tests.ps1 │ ├── DnsRecordPtr.v6.config.ps1 │ ├── DnsRecordPtr.v6.integration.tests.ps1 │ ├── DnsRecordSrv.config.ps1 │ ├── DnsRecordSrv.integration.tests.ps1 │ ├── DnsRecordSrvScoped.config.ps1 │ ├── DnsRecordSrvScoped.integration.tests.ps1 │ ├── DnsServerCache.Integration.Tests.ps1 │ ├── DnsServerCache.config.ps1 │ ├── DnsServerDsSetting.Integration.Tests.ps1 │ ├── DnsServerDsSetting.config.ps1 │ ├── DnsServerEDns.Integration.Tests.ps1 │ ├── DnsServerEDns.config.ps1 │ ├── DnsServerRecursion.Integration.Tests.ps1 │ ├── DnsServerRecursion.config.ps1 │ ├── DnsServerScavenging.Integration.Tests.ps1 │ └── DnsServerScavenging.config.ps1 ├── DSC_DnsServerClientSubnet.Integration.Tests.ps1 ├── DSC_DnsServerClientSubnet.config.ps1 ├── DSC_DnsServerConditionalForwarder.Integration.Tests.ps1 ├── DSC_DnsServerConditionalForwarder.config.ps1 ├── DSC_DnsServerDiagnostics.Integration.Tests.ps1 ├── DSC_DnsServerDiagnostics.config.ps1 ├── DSC_DnsServerForwarder.Integration.Tests.ps1 ├── DSC_DnsServerForwarder.config.ps1 ├── DSC_DnsServerPrimaryZone.Integration.Tests.ps1 ├── DSC_DnsServerPrimaryZone.config.ps1 ├── DSC_DnsServerRootHint.Integration.Tests.ps1 ├── DSC_DnsServerRootHint.config.ps1 ├── DSC_DnsServerSetting.Integration.Tests.ps1 ├── DSC_DnsServerSetting.config.ps1 ├── DSC_DnsServerSettingLegacy.Integration.Tests.ps1 ├── DSC_DnsServerSettingLegacy.config.ps1 ├── DSC_DnsServerZoneAging.Integration.Tests.ps1 ├── DSC_DnsServerZoneAging.config.ps1 ├── DSC_DnsServerZoneScope.Integration.Tests.ps1 └── DSC_DnsServerZoneScope.config.ps1 └── Unit ├── Classes ├── DnsRecordA.tests.ps1 ├── DnsRecordAScoped.tests.ps1 ├── DnsRecordAaaa.tests.ps1 ├── DnsRecordAaaaScoped.tests.ps1 ├── DnsRecordBase.tests.ps1 ├── DnsRecordCname.tests.ps1 ├── DnsRecordCnameScoped.tests.ps1 ├── DnsRecordMx.tests.ps1 ├── DnsRecordMxScoped.tests.ps1 ├── DnsRecordNs.tests.ps1 ├── DnsRecordNsScoped.tests.ps1 ├── DnsRecordPtr.tests.ps1 ├── DnsRecordPtr.v6.tests.ps1 ├── DnsRecordSrv.tests.ps1 ├── DnsRecordSrvScoped.tests.ps1 ├── DnsServerCache.Tests.ps1 ├── DnsServerDsSetting.Tests.ps1 ├── DnsServerEDns.Tests.ps1 ├── DnsServerRecursion.Tests.ps1 └── DnsServerScavenging.Tests.ps1 ├── DSC_DnsServerADZone.Tests.ps1 ├── DSC_DnsServerClientSubnet.Tests.ps1 ├── DSC_DnsServerConditionalForwarder.Tests.ps1 ├── DSC_DnsServerDiagnostics.Tests.ps1 ├── DSC_DnsServerForwarder.Tests.ps1 ├── DSC_DnsServerPrimaryZone.Tests.ps1 ├── DSC_DnsServerRootHint.Tests.ps1 ├── DSC_DnsServerSecondaryZone.Tests.ps1 ├── DSC_DnsServerSetting.Tests.ps1 ├── DSC_DnsServerSettingLegacy.Tests.ps1 ├── DSC_DnsServerZoneAging.Tests.ps1 ├── DSC_DnsServerZoneScope.Tests.ps1 ├── DSC_DnsServerZoneTransfer.Tests.ps1 ├── DnsServerDsc.Common.Tests.ps1 ├── MockObjects ├── ARecordInstance.xml ├── AaaaRecordInstance.xml ├── CnameRecordInstance.xml ├── DnsServerClass.xml ├── MxRecordInstance.xml ├── NsRecordInstance.xml ├── PtrRecordInstance.xml ├── PtrV6RecordInstance.xml └── SrvRecordInstance.xml ├── Private ├── Assert-TimeSpan.Tests.ps1 └── ConvertTo-TimeSpan.Tests.ps1 └── Stubs └── DnsServer.psm1 /.gitattributes: -------------------------------------------------------------------------------- 1 | # Needed for publishing of examples, build worker defaults to core.autocrlf=input. 2 | * text eol=crlf 3 | 4 | # Ensure any exe files are treated as binary 5 | *.exe binary 6 | *.jpg binary 7 | *.xl* binary 8 | *.pfx binary 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/01_general.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: General question or documentation update 3 | about: If you have a general question or documentation update suggestion around the resource module. 4 | --- 5 | 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/02_resource_proposal.yml: -------------------------------------------------------------------------------- 1 | name: New resource proposal 2 | description: If you have a new resource proposal that you think should be added to this resource module. 3 | title: "NewResourceName: New resource proposal" 4 | labels: [] 5 | assignees: [] 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: | 10 | Please replace `NewResourceName` in the issue title (above) with your proposed resource name. 11 | 12 | Thank you for contributing and making this resource module better! 13 | - type: textarea 14 | id: description 15 | attributes: 16 | label: Resource proposal 17 | description: Provide information how this resource will/should work and how it will help users. 18 | validations: 19 | required: true 20 | - type: textarea 21 | id: proposedProperties 22 | attributes: 23 | label: Proposed properties 24 | description: | 25 | List all the proposed properties that the resource should have (key, required, write, and/or read). For each property provide a detailed description, the data type, if a default value should be used, and if the property is limited to a set of values. 26 | value: | 27 | Property | Type qualifier | Data type | Description | Default value | Allowed values 28 | --- | --- | --- | --- | --- | --- 29 | PropertyName | Key | String | Detailed description | None | None 30 | validations: 31 | required: true 32 | - type: textarea 33 | id: considerations 34 | attributes: 35 | label: Special considerations or limitations 36 | description: | 37 | Provide any considerations or limitations you can think of that a contributor should take in account when coding the proposed resource, and or what limitations a user will encounter or should consider when using the proposed resource. 38 | validations: 39 | required: true 40 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/03_command_proposal.yml: -------------------------------------------------------------------------------- 1 | name: New command proposal 2 | description: If you have a proposal for a new public command that you think should be added to this module. The new command that is proposed shall be able to be used by a new or existing resource. 3 | title: "NewCommandName: New command proposal" 4 | labels: [] 5 | assignees: [] 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: | 10 | Please replace `NewCommandName` in the issue title (above) with your proposed command name. 11 | 12 | Thank you for contributing and making this module better! 13 | - type: textarea 14 | id: description 15 | attributes: 16 | label: Command proposal 17 | description: Provide information how this command will/should work and how it will help users. 18 | validations: 19 | required: true 20 | - type: textarea 21 | id: proposedParameters 22 | attributes: 23 | label: Proposed parameters 24 | description: | 25 | List all the proposed parameters and any parameter sets that the command should have. For each parameter provide a detailed description, the data type, if a default value should be used, and if the property is limited to a set of values. 26 | value: | 27 | Parameter | Mandatory | Data type | Description | Default value | Allowed values 28 | --- | --- | --- | --- | --- | --- 29 | ParameterName | Yes | String | Detailed description | None | None 30 | validations: 31 | required: true 32 | - type: textarea 33 | id: considerations 34 | attributes: 35 | label: Special considerations or limitations 36 | description: | 37 | Provide any considerations or limitations you can think of that a contributor should take in account when coding the proposed command, and or what limitations a user will encounter or should consider when using the proposed command. 38 | validations: 39 | required: true 40 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: "Virtual PowerShell User Group #DSC channel" 4 | url: https://dsccommunity.org/community/contact/ 5 | about: "To talk to the community and maintainers of DSC Community, please visit the #DSC channel." 6 | 7 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-stale - https://github.com/probot/stale 2 | 3 | limitPerRun: 30 4 | 5 | pulls: 6 | daysUntilStale: 14 7 | daysUntilClose: false 8 | exemptProjects: true 9 | exemptMilestones: true 10 | staleLabel: abandoned 11 | exemptLabels: 12 | - needs review 13 | - on hold 14 | - waiting for CLA pass 15 | 16 | markComment: > 17 | Labeling this pull request (PR) as abandoned since it has gone 14 days or more 18 | since the last update. An abandoned PR can be continued by another contributor. 19 | The abandoned label will be removed if work on this PR is taken up again. 20 | 21 | issues: 22 | daysUntilStale: 30 23 | daysUntilClose: 40 24 | exemptProjects: true 25 | exemptMilestones: true 26 | staleLabel: stale 27 | exemptLabels: 28 | - bug 29 | - enhancement 30 | - tests 31 | - documentation 32 | - resource proposal 33 | - on hold 34 | 35 | markComment: > 36 | This issue has been automatically marked as stale because 37 | it has not had activity from the community in the last 30 days. It will be 38 | closed if no further activity occurs within 10 days. If the issue is labelled 39 | with any of the work labels (e.g bug, enhancement, documentation, or tests) 40 | then the issue will not auto-close. 41 | 42 | closeComment: > 43 | This issue has been automatically closed because it is has not had activity 44 | from the community in the last 40 days. 45 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | output/ 2 | .vs 3 | .vscode 4 | -------------------------------------------------------------------------------- /.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "default": true, 3 | "MD029": { 4 | "style": "one" 5 | }, 6 | "MD013": true, 7 | "MD024": false, 8 | "MD034": false, 9 | "no-hard-tabs": true 10 | } 11 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "powershell.codeFormatting.openBraceOnSameLine": false, 3 | "powershell.codeFormatting.newLineAfterOpenBrace": true, 4 | "powershell.codeFormatting.newLineAfterCloseBrace": true, 5 | "powershell.codeFormatting.whitespaceBeforeOpenBrace": true, 6 | "powershell.codeFormatting.whitespaceBeforeOpenParen": true, 7 | "powershell.codeFormatting.whitespaceAroundOperator": true, 8 | "powershell.codeFormatting.whitespaceAfterSeparator": true, 9 | "powershell.codeFormatting.ignoreOneLineBlock": false, 10 | "powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline", 11 | "powershell.codeFormatting.preset": "Custom", 12 | "powershell.codeFormatting.alignPropertyValuePairs": true, 13 | "powershell.codeFormatting.useConstantStrings": true, 14 | "powershell.developer.bundledModulesPath": "${cwd}/output/RequiredModules", 15 | "powershell.scriptAnalysis.settingsPath": "/.vscode/analyzersettings.psd1", 16 | "powershell.scriptAnalysis.enable": true, 17 | "files.trimTrailingWhitespace": true, 18 | "files.trimFinalNewlines": true, 19 | "files.insertFinalNewline": true, 20 | "files.associations": { 21 | "*.ps1xml": "xml" 22 | }, 23 | "cSpell.dictionaries": [ 24 | "powershell" 25 | ], 26 | "cSpell.words": [ 27 | "COMPANYNAME", 28 | "ICONURI", 29 | "LICENSEURI", 30 | "PROJECTURI", 31 | "RELEASENOTES", 32 | "buildhelpers", 33 | "endregion", 34 | "gitversion", 35 | "icontains", 36 | "keepachangelog", 37 | "notin", 38 | "pscmdlet", 39 | "steppable" 40 | ], 41 | "cSpell.ignorePaths": [ 42 | ".git" 43 | ], 44 | "[markdown]": { 45 | "files.trimTrailingWhitespace": true, 46 | "files.encoding": "utf8" 47 | }, 48 | "powershell.pester.useLegacyCodeLens": false, 49 | "pester.testFilePath": [ 50 | "[tT]ests/[qQ][aA]/*.[tT]ests.[pP][sS]1", 51 | "[tT]ests/[uU]nit/**/*.[tT]ests.[pP][sS]1", 52 | "[tT]ests/[uU]nit/*.[tT]ests.[pP][sS]1" 53 | ], 54 | "pester.runTestsInNewProcess": true, 55 | "pester.pesterModulePath": "./output/RequiredModules/Pester", 56 | "powershell.pester.codeLens": true, 57 | "pester.suppressCodeLensNotice": true 58 | } 59 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | This project has adopted the [DSC Community Code of Conduct](https://dsccommunity.org/code_of_conduct). 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Please check out common DSC Community [contributing guidelines](https://dsccommunity.org/guidelines/contributing). 4 | 5 | ## Running the Tests 6 | 7 | If want to know how to run this module's tests you can look at the [Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines/#running-tests) 8 | -------------------------------------------------------------------------------- /GitVersion.yml: -------------------------------------------------------------------------------- 1 | mode: ContinuousDelivery 2 | next-version: 0.0.1 3 | major-version-bump-message: '(breaking\schange|breaking)\b' 4 | minor-version-bump-message: '(adds?|minor)\b' 5 | patch-version-bump-message: '\s?(fix|patch)' 6 | no-bump-message: '\+semver:\s?(none|skip)' 7 | assembly-informational-format: '{NuGetVersionV2}+Sha.{Sha}.Date.{CommitDate}' 8 | branches: 9 | master: 10 | tag: preview 11 | regex: ^main$ 12 | pull-request: 13 | tag: PR 14 | feature: 15 | tag: useBranchName 16 | increment: Minor 17 | regex: f(eature(s)?)?[\/-] 18 | source-branches: ['master'] 19 | hotfix: 20 | tag: fix 21 | increment: Patch 22 | regex: (hot)?fix(es)?[\/-] 23 | source-branches: ['master'] 24 | 25 | ignore: 26 | sha: [] 27 | merge-message-formats: {} 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) DSC Community contributors. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DnsServerDsc 2 | 3 | This module contains DSC resources for the management and 4 | configuration of Windows Server DNS Server. 5 | 6 | [![Build Status](https://dev.azure.com/dsccommunity/DnsServerDsc/_apis/build/status/dsccommunity.DnsServerDsc?branchName=main)](https://dev.azure.com/dsccommunity/DnsServerDsc/_build/latest?definitionId=23&branchName=main) 7 | ![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/DnsServerDsc/23/main) 8 | [![codecov](https://codecov.io/gh/dsccommunity/DnsServerDsc/branch/main/graph/badge.svg)](https://codecov.io/gh/dsccommunity/DnsServerDsc) 9 | [![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dsccommunity/DnsServerDsc/23/main)](https://dsccommunity.visualstudio.com/DnsServerDsc/_test/analytics?definitionId=23&contextType=build) 10 | [![PowerShell Gallery (with prereleases)](https://img.shields.io/powershellgallery/vpre/DnsServerDsc?label=DnsServerDsc%20Preview)](https://www.powershellgallery.com/packages/DnsServerDsc/) 11 | [![PowerShell Gallery](https://img.shields.io/powershellgallery/v/DnsServerDsc?label=DnsServerDsc)](https://www.powershellgallery.com/packages/DnsServerDsc/) 12 | 13 | ## Code of Conduct 14 | 15 | This project has adopted this [Code of Conduct](CODE_OF_CONDUCT.md). 16 | 17 | ## Releases 18 | 19 | For each merge to the branch `main` a preview release will be 20 | deployed to [PowerShell Gallery](https://www.powershellgallery.com/). 21 | Periodically a release version tag will be pushed which will deploy a 22 | full release to [PowerShell Gallery](https://www.powershellgallery.com/). 23 | 24 | ## Contributing 25 | 26 | Please check out common DSC Community [contributing guidelines](https://dsccommunity.org/guidelines/contributing). 27 | 28 | ## Change log 29 | 30 | A full list of changes in each version can be found in the [change log](CHANGELOG.md). 31 | 32 | ## Documentation 33 | 34 | The documentation can be found in the [DnsServerDsc Wiki](https://github.com/dsccommunity/DnsServerDsc/wiki). 35 | The DSC resources schema files is used to automatically update the 36 | documentation on each PR merge. 37 | 38 | ### Examples 39 | 40 | You can review the [Examples](/source/Examples) directory in the DnsServerDsc module 41 | for some general use scenarios for all of the resources that are in the module. 42 | 43 | The resource examples are also available in the [DnsServerDsc Wiki](https://github.com/dsccommunity/DnsServerDsc/wiki). 44 | -------------------------------------------------------------------------------- /RequiredModules.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | PSDependOptions = @{ 3 | AddToPath = $true 4 | Target = 'output\RequiredModules' 5 | Parameters = @{ 6 | Repository = 'PSGallery' 7 | } 8 | } 9 | 10 | InvokeBuild = 'latest' 11 | PSScriptAnalyzer = 'latest' 12 | ConvertToSARIF = 'latest' # cSpell: disable-line 13 | Pester = 'latest' 14 | Plaster = 'latest' 15 | ModuleBuilder = 'latest' 16 | ChangelogManagement = 'latest' 17 | Sampler = 'latest' 18 | 'Sampler.GitHubTasks' = 'latest' 19 | MarkdownLinkCheck = 'latest' 20 | 'DscResource.Test' = '0.16.3' 21 | xDscResourceDesigner = 'latest' 22 | 23 | # Build dependent modules 24 | 'DscResource.Base' = 'latest' 25 | 'DscResource.Common' = 'latest' 26 | 27 | 'DscResource.AnalyzerRules' = 'latest' 28 | 'Indented.ScriptAnalyzerRules' = 'latest' 29 | 30 | # Prerequisite modules for documentation. 31 | 'DscResource.DocGenerator' = 'latest' 32 | PlatyPS = 'latest' 33 | } 34 | -------------------------------------------------------------------------------- /Resolve-Dependency.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | Gallery = 'PSGallery' 3 | AllowPrerelease = $false 4 | WithYAML = $true 5 | 6 | #UseModuleFast = $true 7 | #ModuleFastVersion = '0.1.2' 8 | #ModuleFastBleedingEdge = $true 9 | 10 | UsePSResourceGet = $true 11 | #PSResourceGetVersion = '1.0.1' 12 | 13 | UsePowerShellGetCompatibilityModule = $true 14 | UsePowerShellGetCompatibilityModuleVersion = '3.0.23-beta23' 15 | } 16 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | require_ci_to_pass: no 3 | # master should be the baseline for reporting 4 | branch: main 5 | 6 | comment: 7 | layout: "reach, diff, flags, files" 8 | behavior: default 9 | 10 | coverage: 11 | range: 50..80 12 | round: down 13 | precision: 0 14 | 15 | status: 16 | project: 17 | default: 18 | # Set the overall project code coverage requirement to 70% 19 | target: 70 20 | patch: 21 | default: 22 | # Set the pull request requirement to not regress overall coverage by more than 5% 23 | # and let codecov.io set the goal for the code changed in the patch. 24 | target: auto 25 | threshold: 5 26 | -------------------------------------------------------------------------------- /source/Classes/001.DnsServerReason.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The reason a property of a DSC resource is not in desired state. 4 | 5 | .DESCRIPTION 6 | A DSC resource can have a read-only property `Reasons` that the compliance 7 | part (audit via Azure Policy) of Azure AutoManage Machine Configuration 8 | uses. The property Reasons holds an array of DnsServerReason. Each DnsServerReason 9 | explains why a property of a DSC resource is not in desired state. 10 | #> 11 | 12 | class DnsServerReason 13 | { 14 | [DscProperty()] 15 | [System.String] 16 | $Code 17 | 18 | [DscProperty()] 19 | [System.String] 20 | $Phrase 21 | } 22 | -------------------------------------------------------------------------------- /source/Classes/012.ResourcePropertiesBase.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | A class with DSC properties that are equal for all class-based resources. 4 | 5 | .DESCRIPTION 6 | A class with DSC properties that are equal for all class-based resources. 7 | 8 | .PARAMETER DnsServer 9 | The host name of the Domain Name System (DNS) server, or use 'localhost' 10 | for the current node. Defaults to `'localhost'`. 11 | #> 12 | 13 | class ResourcePropertiesBase 14 | { 15 | [DscProperty()] 16 | [System.String] 17 | $DnsServer = 'localhost' 18 | } 19 | -------------------------------------------------------------------------------- /source/Classes/040.DnsRecordAScoped.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The DnsRecordAScoped DSC resource manages A DNS records against a specific zone and zone scope on a Domain Name System (DNS) server. 4 | 5 | .DESCRIPTION 6 | The DnsRecordAScoped DSC resource manages A DNS records against a specific zone and zone scope on a Domain Name System (DNS) server. 7 | 8 | .PARAMETER ZoneScope 9 | Specifies the name of a zone scope. (Key Parameter) 10 | #> 11 | 12 | [DscResource()] 13 | class DnsRecordAScoped : DnsRecordA 14 | { 15 | [DscProperty(Key)] 16 | [System.String] 17 | $ZoneScope 18 | 19 | DnsRecordAScoped () 20 | { 21 | } 22 | 23 | [DnsRecordAScoped] Get() 24 | { 25 | return ([DnsRecordBase] $this).Get() 26 | } 27 | 28 | [void] Set() 29 | { 30 | ([DnsRecordBase] $this).Set() 31 | } 32 | 33 | [System.Boolean] Test() 34 | { 35 | return ([DnsRecordBase] $this).Test() 36 | } 37 | 38 | hidden [Microsoft.Management.Infrastructure.CimInstance] GetResourceRecord() 39 | { 40 | return ([DnsRecordA] $this).GetResourceRecord() 41 | } 42 | 43 | hidden [DnsRecordAScoped] NewDscResourceObjectFromRecord([Microsoft.Management.Infrastructure.CimInstance] $record) 44 | { 45 | $dscResourceObject = [DnsRecordAScoped] @{ 46 | ZoneName = $this.ZoneName 47 | ZoneScope = $this.ZoneScope 48 | Name = $this.Name 49 | IPv4Address = $this.IPv4Address 50 | TimeToLive = $record.TimeToLive.ToString() 51 | DnsServer = $this.DnsServer 52 | Ensure = 'Present' 53 | } 54 | 55 | return $dscResourceObject 56 | } 57 | 58 | hidden [void] AddResourceRecord() 59 | { 60 | ([DnsRecordA] $this).AddResourceRecord() 61 | } 62 | 63 | hidden [void] ModifyResourceRecord([Microsoft.Management.Infrastructure.CimInstance] $existingRecord, [System.Collections.Hashtable[]] $propertiesNotInDesiredState) 64 | { 65 | ([DnsRecordA] $this).ModifyResourceRecord($existingRecord, $propertiesNotInDesiredState) 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /source/Classes/040.DnsRecordAaaaScoped.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The DnsRecordAaaaScoped DSC resource manages AAAA DNS records against a specific zone and zone scope on a Domain Name System (DNS) server. 4 | 5 | .DESCRIPTION 6 | The DnsRecordAaaaScoped DSC resource manages AAAA DNS records against a specific zone and zone scope on a Domain Name System (DNS) server. 7 | 8 | .PARAMETER ZoneScope 9 | Specifies the name of a zone scope. (Key Parameter) 10 | #> 11 | 12 | [DscResource()] 13 | class DnsRecordAaaaScoped : DnsRecordAaaa 14 | { 15 | [DscProperty(Key)] 16 | [System.String] 17 | $ZoneScope 18 | 19 | DnsRecordAaaaScoped() 20 | { 21 | } 22 | 23 | [DnsRecordAaaaScoped] Get() 24 | { 25 | return ([DnsRecordBase] $this).Get() 26 | } 27 | 28 | [void] Set() 29 | { 30 | ([DnsRecordBase] $this).Set() 31 | } 32 | 33 | [System.Boolean] Test() 34 | { 35 | return ([DnsRecordBase] $this).Test() 36 | } 37 | 38 | hidden [Microsoft.Management.Infrastructure.CimInstance] GetResourceRecord() 39 | { 40 | return ([DnsRecordAaaa] $this).GetResourceRecord() 41 | } 42 | 43 | hidden [DnsRecordAaaaScoped] NewDscResourceObjectFromRecord([Microsoft.Management.Infrastructure.CimInstance] $record) 44 | { 45 | $dscResourceObject = [DnsRecordAaaaScoped] @{ 46 | ZoneName = $this.ZoneName 47 | ZoneScope = $this.ZoneScope 48 | Name = $this.Name 49 | IPv6Address = $this.IPv6Address 50 | TimeToLive = $record.TimeToLive.ToString() 51 | DnsServer = $this.DnsServer 52 | Ensure = 'Present' 53 | } 54 | 55 | return $dscResourceObject 56 | } 57 | 58 | hidden [void] AddResourceRecord() 59 | { 60 | ([DnsRecordAaaa] $this).AddResourceRecord() 61 | } 62 | 63 | hidden [void] ModifyResourceRecord([Microsoft.Management.Infrastructure.CimInstance] $existingRecord, [System.Collections.Hashtable[]] $propertiesNotInDesiredState) 64 | { 65 | ([DnsRecordAaaa] $this).ModifyResourceRecord($existingRecord, $propertiesNotInDesiredState) 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /source/Classes/040.DnsRecordCnameScoped.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The DnsRecordCnameScoped DSC resource manages CNAME DNS records against a specific zone and zone scope on a Domain Name System (DNS) server. 4 | 5 | .DESCRIPTION 6 | The DnsRecordCnameScoped DSC resource manages CNAME DNS records against a specific zone and zone scope on a Domain Name System (DNS) server. 7 | 8 | .PARAMETER ZoneScope 9 | Specifies the name of a zone scope. (Key Parameter) 10 | #> 11 | 12 | [DscResource()] 13 | class DnsRecordCnameScoped : DnsRecordCname 14 | { 15 | [DscProperty(Key)] 16 | [System.String] 17 | $ZoneScope 18 | 19 | DnsRecordCnameScoped() 20 | { 21 | } 22 | 23 | [DnsRecordCnameScoped] Get() 24 | { 25 | return ([DnsRecordBase] $this).Get() 26 | } 27 | 28 | [void] Set() 29 | { 30 | ([DnsRecordBase] $this).Set() 31 | } 32 | 33 | [System.Boolean] Test() 34 | { 35 | return ([DnsRecordBase] $this).Test() 36 | } 37 | 38 | hidden [Microsoft.Management.Infrastructure.CimInstance] GetResourceRecord() 39 | { 40 | return ([DnsRecordCname] $this).GetResourceRecord() 41 | } 42 | 43 | hidden [DnsRecordCnameScoped] NewDscResourceObjectFromRecord([Microsoft.Management.Infrastructure.CimInstance] $record) 44 | { 45 | $dscResourceObject = [DnsRecordCnameScoped] @{ 46 | ZoneName = $this.ZoneName 47 | ZoneScope = $this.ZoneScope 48 | Name = $this.Name 49 | HostNameAlias = $this.HostNameAlias 50 | TimeToLive = $record.TimeToLive.ToString() 51 | DnsServer = $this.DnsServer 52 | Ensure = 'Present' 53 | } 54 | 55 | return $dscResourceObject 56 | } 57 | 58 | hidden [void] AddResourceRecord() 59 | { 60 | ([DnsRecordCname] $this).AddResourceRecord() 61 | } 62 | 63 | hidden [void] ModifyResourceRecord([Microsoft.Management.Infrastructure.CimInstance] $existingRecord, [System.Collections.Hashtable[]] $propertiesNotInDesiredState) 64 | { 65 | ([DnsRecordCname] $this).ModifyResourceRecord($existingRecord, $propertiesNotInDesiredState) 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /source/Classes/040.DnsRecordMxScoped.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The DnsRecordMxScoped DSC resource manages MX DNS records against a specific zone and zone scope on a Domain Name System (DNS) server. 4 | 5 | .DESCRIPTION 6 | The DnsRecordMxScoped DSC resource manages MX DNS records against a specific zone and zone scope on a Domain Name System (DNS) server. 7 | 8 | .PARAMETER ZoneScope 9 | Specifies the name of a zone scope. (Key Parameter) 10 | #> 11 | 12 | [DscResource()] 13 | class DnsRecordMxScoped : DnsRecordMx 14 | { 15 | [DscProperty(Key)] 16 | [System.String] 17 | $ZoneScope 18 | 19 | DnsRecordMxScoped() 20 | { 21 | } 22 | 23 | [DnsRecordMxScoped] Get() 24 | { 25 | return ([DnsRecordBase] $this).Get() 26 | } 27 | 28 | [void] Set() 29 | { 30 | ([DnsRecordBase] $this).Set() 31 | } 32 | 33 | [System.Boolean] Test() 34 | { 35 | return ([DnsRecordBase] $this).Test() 36 | } 37 | 38 | hidden [Microsoft.Management.Infrastructure.CimInstance] GetResourceRecord() 39 | { 40 | return ([DnsRecordMx] $this).GetResourceRecord() 41 | } 42 | 43 | hidden [DnsRecordMxScoped] NewDscResourceObjectFromRecord([Microsoft.Management.Infrastructure.CimInstance] $record) 44 | { 45 | $dscResourceObject = [DnsRecordMxScoped] @{ 46 | ZoneName = $this.ZoneName 47 | ZoneScope = $this.ZoneScope 48 | EmailDomain = $this.EmailDomain 49 | MailExchange = $this.MailExchange 50 | Priority = $record.RecordData.Preference 51 | TimeToLive = $record.TimeToLive.ToString() 52 | DnsServer = $this.DnsServer 53 | Ensure = 'Present' 54 | } 55 | 56 | return $dscResourceObject 57 | } 58 | 59 | hidden [void] AddResourceRecord() 60 | { 61 | ([DnsRecordMx] $this).AddResourceRecord() 62 | } 63 | 64 | hidden [void] ModifyResourceRecord([Microsoft.Management.Infrastructure.CimInstance] $existingRecord, [System.Collections.Hashtable[]] $propertiesNotInDesiredState) 65 | { 66 | ([DnsRecordMx] $this).ModifyResourceRecord($existingRecord, $propertiesNotInDesiredState) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /source/Classes/040.DnsRecordNsScoped.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The DnsRecordNsScoped DSC resource manages NS DNS records against a specific zone and zone scope on a Domain Name System (DNS) server. 4 | 5 | .DESCRIPTION 6 | The DnsRecordNsScoped DSC resource manages NS DNS records against a specific zone and zone scope on a Domain Name System (DNS) server. 7 | 8 | .PARAMETER ZoneScope 9 | Specifies the name of a zone scope. (Key Parameter) 10 | #> 11 | 12 | [DscResource()] 13 | class DnsRecordNsScoped : DnsRecordNs 14 | { 15 | [DscProperty(Key)] 16 | [System.String] 17 | $ZoneScope 18 | 19 | DnsRecordNsScoped() 20 | { 21 | } 22 | 23 | [DnsRecordNsScoped] Get() 24 | { 25 | return ([DnsRecordBase] $this).Get() 26 | } 27 | 28 | [void] Set() 29 | { 30 | ([DnsRecordBase] $this).Set() 31 | } 32 | 33 | [System.Boolean] Test() 34 | { 35 | return ([DnsRecordBase] $this).Test() 36 | } 37 | 38 | hidden [Microsoft.Management.Infrastructure.CimInstance] GetResourceRecord() 39 | { 40 | return ([DnsRecordNs] $this).GetResourceRecord() 41 | } 42 | 43 | hidden [DnsRecordNsScoped] NewDscResourceObjectFromRecord([Microsoft.Management.Infrastructure.CimInstance] $record) 44 | { 45 | $dscResourceObject = [DnsRecordNsScoped] @{ 46 | ZoneName = $this.ZoneName 47 | ZoneScope = $this.ZoneScope 48 | DomainName = $this.DomainName 49 | NameServer = $this.NameServer 50 | TimeToLive = $record.TimeToLive.ToString() 51 | DnsServer = $this.DnsServer 52 | Ensure = 'Present' 53 | } 54 | 55 | return $dscResourceObject 56 | } 57 | 58 | hidden [void] AddResourceRecord() 59 | { 60 | ([DnsRecordNs] $this).AddResourceRecord() 61 | } 62 | 63 | hidden [void] ModifyResourceRecord([Microsoft.Management.Infrastructure.CimInstance] $existingRecord, [System.Collections.Hashtable[]] $propertiesNotInDesiredState) 64 | { 65 | ([DnsRecordNs] $this).ModifyResourceRecord($existingRecord, $propertiesNotInDesiredState) 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerADZone/DSC_DnsServerADZone.schema.mof: -------------------------------------------------------------------------------- 1 | [ClassVersion("1.0.0.0"), FriendlyName("DnsServerADZone")] 2 | class DSC_DnsServerADZone : OMI_BaseResource 3 | { 4 | [Key, Description("Name of the AD DNS zone")] String Name; 5 | [Write, Description("AD zone dynamic DNS update option. Defaults to `'Secure'`."), ValueMap{"None","NonSecureAndSecure","Secure"}, Values{"None","NonSecureAndSecure","Secure"}] String DynamicUpdate; 6 | [Required, Description("AD zone replication scope option."), ValueMap{"Custom","Domain","Forest","Legacy"}, Values{"Custom","Domain","Forest","Legacy"}] String ReplicationScope; 7 | [Write, Description("Name of the directory partition on which to store the zone. Use this parameter when the ReplicationScope parameter has a value of Custom.")] String DirectoryPartitionName; 8 | [Write, Description("Specifies a DNS server. If you do not specify this parameter, the command runs on the local system.")] String ComputerName; 9 | [Write, Description("Specifies the credential to use to create the AD zone on a remote computer. This parameter can only be used when you also are passing a value for the `ComputerName` parameter."), EmbeddedInstance("MSFT_Credential")] String Credential; 10 | [Write, Description("Whether the DNS zone should be available or removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; 11 | }; 12 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerADZone/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | The DnsServerADZone DSC resource manages an AD integrated zone on a Domain Name System (DNS) server. 4 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerADZone/en-US/DSC_DnsServerADZone.strings.psd1: -------------------------------------------------------------------------------- 1 | # culture="en-US" 2 | ConvertFrom-StringData @' 3 | CheckingZoneMessage = Checking DNS server zone with name '{0}' is '{1}'... 4 | AddingZoneMessage = Adding DNS server zone '{0}' ... 5 | RemovingZoneMessage = Removing DNS server zone '{0}' ... 6 | NotDesiredPropertyMessage = DNS server zone property '{0}' is not correct. Expected '{1}', actual '{2}' 7 | SetPropertyMessage = DNS server zone property '{0}' is set 8 | CredentialRequiresComputerNameMessage = The Credentials Parameter can only be used when ComputerName is also specified. 9 | DirectoryPartitionReplicationScopeError = A Directory Partition can only be specified when the Replication Scope is set to 'Custom' 10 | '@ 11 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerClientSubnet/DSC_DnsServerClientSubnet.schema.mof: -------------------------------------------------------------------------------- 1 | [ClassVersion("1.0.0.0"), FriendlyName("DnsServerClientSubnet")] 2 | class DSC_DnsServerClientSubnet : OMI_BaseResource 3 | { 4 | [Key, Description("Specifies the name of the client subnet.")] string Name; 5 | [Write, Description("Specify an array (1 or more values) of IPv4 Subnet addresses in CIDR Notation.")] string IPv4Subnet[]; 6 | [Write, Description("Specify an array (1 or more values) of IPv6 Subnet addresses in CIDR Notation.")] string IPv6Subnet[]; 7 | [Write, Description("Should this DNS server client subnet be present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; 8 | }; 9 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerClientSubnet/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | The DnsServerClientSubnet DSC resource manages DNS Client Subnets on a Domain Name System (DNS) server. A client subnet is a group of IP subnets that represent a logical group, for example, a geographical area, a datacenter, or a trusted resolver fleet. You can use client subnets in criteria in DNS policies. Multiple DNS policies can refer to the same client subnet. 4 | 5 | ## Requirements 6 | 7 | - Target machine must be running Windows Server 2016 or later. 8 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerClientSubnet/en-US/DSC_DnsServerClientSubnet.strings.psd1: -------------------------------------------------------------------------------- 1 | # culture="en-US" 2 | ConvertFrom-StringData @' 3 | GettingDnsServerClientSubnetMessage = Getting DNS Server Client Subnet '{0}'. 4 | CreatingDnsServerClientSubnetMessage = Creating DNS Server Client Subnet '{0}' IPv4 '{1}' and/or IPv6 '{2}'. 5 | UpdatingDnsServerClientSubnetMessage = Updating DNS Server Client Subnet '{0}' IPv4 '{1}' and/or IPv6 '{2}'. 6 | RemovingDnsServerClientSubnetMessage = Removing DNS Server Client Subnet '{0}'. 7 | NotDesiredPropertyMessage = DNS Server Client Subnet property '{0}' is not correct. Expected '{1}', actual '{2}' 8 | InDesiredStateMessage = DNS Server Client Subnet '{0}' is in the desired state. 9 | NotInDesiredStateMessage = DNS Server Client Subnet '{0}' is NOT in the desired state. 10 | '@ 11 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerConditionalForwarder/DSC_DnsServerConditionalForwarder.schema.mof: -------------------------------------------------------------------------------- 1 | [ClassVersion("1.0.0.0"), FriendlyName("DnsServerConditionalForwarder")] 2 | class DSC_DnsServerConditionalForwarder : OMI_BaseResource 3 | { 4 | [Write, Description("Ensure whether the zone is absent or present."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure; 5 | [Key, Description("The name of the zone to manage.")] String Name; 6 | [Write, Description("The IP addresses the forwarder should use. Mandatory if Ensure is present.")] String MasterServers[]; 7 | [Write, Description("Whether the conditional forwarder should be replicated in AD, and the scope of that replication. Default is `None`."), ValueMap{"None", "Custom", "Domain", "Forest", "Legacy"}, Values{"None", "Custom", "Domain", "Forest", "Legacy"}] String ReplicationScope; 8 | [Write, Description("The name of the directory partition to use when the ReplicationScope is `Custom`. This value is ignored for all other replication scopes.")] String DirectoryPartitionName; 9 | [Read, Description("The zone type")] String ZoneType; 10 | }; 11 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerConditionalForwarder/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | The DnsServerConditionalForwarder DSC resource manages a conditional forwarder on a Domain Name System (DNS) server. 4 | 5 | You can manage the master servers, forwarder time-out, recursion, recursion scope, and directory partition name for a conditional forwarder zone. 6 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerConditionalForwarder/en-US/DSC_DnsServerConditionalForwarder.strings.psd1: -------------------------------------------------------------------------------- 1 | # culture="en-US" 2 | ConvertFrom-StringData @' 3 | FoundZone = Found a {0} zone named {1}. 4 | CouldNotFindZone = Unable to find a zone named {0}. 5 | RecreateZone = The {0} zone {1} was removed pending recreation. The existing zone type or replication scope cannot be converted. 6 | UpdatingMasterServers = The list of servers for the conditional forwarder, {0}, was updated to {1}. 7 | MoveADZone = The conditional forwarder, {0}, was moved to {1} replication scope. 8 | NewZone = The conditional forwarder, {0}, was created. 9 | RemoveZone = The conditional forwarder, {0}, was removed. 10 | ZoneDoesNotExist = The zone, {0}, does not exist. 11 | IncorrectZoneType = The zone {0} is {1}. Expected forwarder. 12 | ZoneIsDsIntegrated = The zone {0} is AD Integrated. Expected file. 13 | ZoneIsFileBased = The zone {0} is file based. Expected AD Integrated. 14 | ReplicationScopeDoesNotMatch = The zone {0} has replication scope {1}. Expected replication scope {2}. 15 | DirectoryPartitionDoesNotMatch = The zone {0} is not stored in the partition {1}. 16 | MasterServersDoNotMatch = Expected master servers for the zone {0} to be {1}. Found {2}. 17 | ZoneExists = The zone, {0}, exists. 18 | MasterServersIsMandatory = The MasterServers parameter is mandatory when ensuring a zone is present. 19 | DirectoryPartitionNameIsMandatory = A DirectoryPartitionName is mandatory when the replication scope is custom. 20 | '@ 21 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerDiagnostics/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | The DnsServerDiagnostics DSC resource manages the debugging and logging 4 | parameters on a Domain Name System (DNS) server. 5 | 6 | If the parameter **DnsServer** is set to `'localhost'` then the resource 7 | can normally use the default credentials (SYSTEM) to configure the DNS server 8 | settings. If using any other value for the parameter **DnsServer** make sure 9 | that the credential the resource is run as have the correct permissions 10 | at the target node and the necessary network traffic is permitted. 11 | It is possible to run the resource with specific credentials using the 12 | built-in parameter **PsDscRunAsCredential**. 13 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerDiagnostics/en-US/DSC_DnsServerDiagnostics.strings.psd1: -------------------------------------------------------------------------------- 1 | # culture="en-US" 2 | ConvertFrom-StringData @' 3 | GettingDnsServerDiagnosticsMessage = Getting DNS Server diagnostics 4 | SettingDnsServerDiagnosticsMessage = Setting DNS Server diagnostics 5 | EvaluatingDnsServerDiagnosticsMessage = Evaluating the DNS Server Diagnostics 6 | '@ 7 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerForwarder/DSC_DnsServerForwarder.schema.mof: -------------------------------------------------------------------------------- 1 | [ClassVersion("1.0.0.0"), FriendlyName("DnsServerForwarder")] 2 | class DSC_DnsServerForwarder : OMI_BaseResource 3 | { 4 | [Key, Description("Specifies the resource is a single instance, the value must be `'Yes'`."), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; 5 | [Write, Description("IP addresses of the forwarders")] String IPAddresses[]; 6 | [Write, Description("Specifies if you want to use root hint or not.")] Boolean UseRootHint; 7 | [Write, Description("Specifies whether to enable the DNS server to reorder forwarders dynamically.")] Boolean EnableReordering; 8 | [Write, Description("Specifies the number of seconds that the DNS server waits for a response from the forwarder. The minimum value is 0, and the maximum value is 15.")] UInt32 Timeout; 9 | }; 10 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerForwarder/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | The DnsServerForwarder DSC resource manages the DNS forwarder list of a 4 | Domain Name System (DNS) server. If the parameter `EnableReordering` is set 5 | to `$false` then the preferred forwarder can be put in the series of forwarder 6 | IP addresses. 7 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerForwarder/en-US/DSC_DnsServerForwarder.strings.psd1: -------------------------------------------------------------------------------- 1 | # culture="en-US" 2 | ConvertFrom-StringData @' 3 | GettingDnsForwardersMessage = Getting current DNS forwarders. 4 | SettingDnsForwardersMessage = Setting DNS forwarders. 5 | ValidatingIPAddressesMessage = Validate IP addresses. 6 | DeletingDnsForwardersMessage = Deleting DNS forwarders. 7 | SettingUseRootHintProperty = Setting the use root hint property to {0}. 8 | SettingEnableReorderingProperty = Setting the enable DNS reordering property to {0}. 9 | SettingTimeoutProperty = Setting the timeout property to {0}. 10 | '@ 11 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerPrimaryZone/DSC_DnsServerPrimaryZone.schema.mof: -------------------------------------------------------------------------------- 1 | [ClassVersion("1.0.0.0"), FriendlyName("DnsServerPrimaryZone")] 2 | class DSC_DnsServerPrimaryZone : OMI_BaseResource 3 | { 4 | [Key, Description("Name of the DNS Server primary zone")] String Name; 5 | [Write, Description("Name of the DNS Server primary zone file. If not specified, defaults to 'ZoneName.dns'.")] String ZoneFile; 6 | [Write, Description("Primary zone dynamic DNS update option. Defaults to `'None'`."), ValueMap{"None","NonSecureAndSecure"}, Values{"None","NonSecureAndSecure"}] String DynamicUpdate; 7 | [Write, Description("Whether the DNS zone should be present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; 8 | }; 9 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerPrimaryZone/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | The DnsServerPrimaryZone DSC resource manages a standalone file-backed Primary zone on a given Domain Name System (DNS) server. 4 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerPrimaryZone/en-US/DSC_DnsServerPrimaryZone.strings.psd1: -------------------------------------------------------------------------------- 1 | # culture="en-US" 2 | ConvertFrom-StringData @' 3 | CheckingZoneMessage = Checking DNS server zone with name '{0}' is '{1}'... 4 | AddingZoneMessage = Adding DNS server zone '{0}' ... 5 | RemovingZoneMessage = Removing DNS server zone '{0}' ... 6 | NotDesiredPropertyMessage = DNS server zone property '{0}' is not correct. Expected '{1}', actual '{2}' 7 | SetPropertyMessage = DNS server zone property '{0}' is set 8 | '@ 9 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerRootHint/DSC_DnsServerRootHint.schema.mof: -------------------------------------------------------------------------------- 1 | [ClassVersion("1.0.0.0"), FriendlyName("DnsServerRootHint")] 2 | class DSC_DnsServerRootHint : OMI_BaseResource 3 | { 4 | [Key, Description("Specifies the resource is a single instance, the value must be `'Yes'`."), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; 5 | [Required, Description("A hashtable that defines the name server. Key and value must be strings."), EmbeddedInstance("MSFT_KeyValuePair")] String NameServer[]; 6 | }; 7 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerRootHint/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | The DnsServerRootHint DSC resource manages root hints on a Domain Name System (DNS) server. 4 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerRootHint/en-US/DSC_DnsServerRootHint.strings.psd1: -------------------------------------------------------------------------------- 1 | # culture="en-US" 2 | ConvertFrom-StringData @' 3 | GettingCurrentRootHintsMessage = Getting current root hints. 4 | FoundRootHintsMessage = Found {0} root hints. 5 | RemovingAllRootHintsMessage = Removing all root hints. 6 | AddingRootHintMessage = Adding root hint '{0}'. 7 | ValidatingRootHintsMessage = Validating root hints. 8 | '@ 9 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerSecondaryZone/DSC_DnsServerSecondaryZone.schema.mof: -------------------------------------------------------------------------------- 1 | [ClassVersion("1.0.0.0"), FriendlyName("DnsServerSecondaryZone")] 2 | class DSC_DnsServerSecondaryZone : OMI_BaseResource 3 | { 4 | [Key, Description("Name of the secondary zone")] String Name; 5 | [Required, Description("IP address or DNS name of the secondary DNS servers")] String MasterServers[]; 6 | [Write, Description("Whether the secondary zone should be present or absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; 7 | [Read, Description("Type of the DNS server zone")] String Type; 8 | }; 9 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerSecondaryZone/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | The DnsServerSecondaryZone DSC resource manages a standalone file-backed 4 | secondary zone on a Domain Name System (DNS) server. Secondary zones allow 5 | client machine in primary DNS zones to do DNS resolution of machines in the 6 | secondary DNS zone. 7 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerSecondaryZone/en-US/DSC_DnsServerSecondaryZone.strings.psd1: -------------------------------------------------------------------------------- 1 | # culture="en-US" 2 | ConvertFrom-StringData @' 3 | CheckingZoneMessage = Checking DNS server zone with name {0} ... 4 | TestZoneMessage = Named DNS server zone is {0} and it should be {1} 5 | RemovingZoneMessage = Removing DNS server zone ... 6 | DeleteZoneMessage = DNS server zone {0} is now absent 7 | CheckingSecondaryZoneMessage = Checking if the DNS server zone is a secondary zone ... 8 | AlreadySecondaryZoneMessage = DNS server zone {0} is already a secondary zone 9 | NotSecondaryZoneMessage = DNS server zone {0} is not a secondary zone but {1} zone 10 | AddingSecondaryZoneMessage = Adding secondary DNS server zone ... 11 | NewSecondaryZoneMessage = DNS server secondary zone {0} is now present 12 | SetSecondaryZoneMessage = DNS server zone {0} is now a secondary zone 13 | CheckPropertyMessage = Checking DNS secondary server {0} ... 14 | NotDesiredPropertyMessage = DNS server secondary zone {0} is not correct. Expected {1}, actual {2} 15 | DesiredPropertyMessage = DNS server secondary zone {0} is correct 16 | SetPropertyMessage = DNS server secondary zone {0} is set 17 | '@ 18 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerSetting/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | The DnsServerSetting DSC resource manages the Domain Name System (DNS) server 4 | settings and properties. 5 | 6 | If the parameter **DnsServer** is set to `'localhost'` then the resource 7 | can normally use the default credentials (SYSTEM) to configure the DNS server 8 | settings. If using any other value for the parameter **DnsServer** make sure 9 | that the credential the resource is run as have the correct permissions 10 | at the target node and the necessary network traffic is permitted (_WsMan_ 11 | protocol). It is possible to run the resource with specific credentials using the 12 | built-in parameter **PsDscRunAsCredential**. 13 | 14 | Please see [DnsServerSetting class](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/dnsserverpsprov/dnsserversetting) 15 | for more information around the properties this resource supports. 16 | 17 | ## Requirements 18 | 19 | - Target machine must be running Windows Server 2012 or later. 20 | - Properties `RootTrustAnchorsURL` and `ZoneWritebackInterval` is not 21 | supported by _Windows Server 2012_. 22 | - Properties `IgnoreServerLevelPolicies`, `IgnoreAllPolicies`, 23 | `ScopeOptionValue`, and `VirtualizationInstanceOptionValue` are not 24 | supported by _Windows Server 2012_ and _Windows Server 2012 R2_. 25 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerSetting/en-US/DSC_DnsServerSetting.strings.psd1: -------------------------------------------------------------------------------- 1 | # culture="en-US" 2 | ConvertFrom-StringData @' 3 | GettingDnsServerSettings = Getting DNS Server Settings. (DSS0001) 4 | SetDnsServerSetting = Setting DNS Server setting '{0}' to value '{1}'. (DSS0002) 5 | EvaluatingDnsServerSettings = Evaluating the DNS Server settings. (DSS0003) 6 | PropertyInDesiredState = The property '{0}' is already in desired state. (DSS0004) 7 | SettingsInDesiredState = The DNS Server settings are in desired state. (DSS0005) 8 | UnableToParseTimeSpan = Could not parse the value '{0}' of the property '{1}'. (DSS0006) 9 | '@ 10 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerSettingLegacy/DSC_DnsServerSettingLegacy.schema.mof: -------------------------------------------------------------------------------- 1 | [ClassVersion("1.0.0.0"), FriendlyName("DnsServerSettingLegacy")] 2 | class DSC_DnsServerSettingLegacy : OMI_BaseResource 3 | { 4 | [Key, Description("Specifies the DNS server to connect to, or use 'localhost' for the current node.")] String DnsServer; 5 | [Write, Description("Indicates whether the default port binding for a socket used to send queries to remote DNS Servers can be overridden.")] Boolean DisjointNets; 6 | [Write, Description("TRUE if the DNS server does not use recursion when name-resolution through forwarders fails.")] Boolean NoForwarderRecursion; 7 | [Write, Description("Indicates which policies are activated in the Event Viewer system log.")] UInt32 LogLevel; 8 | }; 9 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerSettingLegacy/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | The DnsServerSettingLegacy DSC resource manages the Domain Name System (DNS) server 4 | legacy settings. 5 | 6 | If the parameter **DnsServer** is set to `'localhost'` then the resource 7 | can normally use the default credentials (SYSTEM) to configure the DNS server 8 | settings. If using any other value for the parameter **DnsServer** make sure 9 | that the credential the resource is run as have the correct permissions 10 | at the target node and the necessary network traffic is permitted (_WsMan_ 11 | protocol). It is possible to run the resource with specific credentials using the 12 | built-in parameter **PsDscRunAsCredential**. 13 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerSettingLegacy/en-US/DSC_DnsServerSettingLegacy.strings.psd1: -------------------------------------------------------------------------------- 1 | # culture="en-US" 2 | ConvertFrom-StringData @' 3 | GettingDnsServerSettings = Getting DNS Server legacy settings. (DSSL0001) 4 | SetDnsServerSetting = Setting DNS Server legacy setting '{0}' to value '{1}'. (DSSL0002) 5 | EvaluatingDnsServerSettings = Evaluating the DNS Server legacy settings. (DSSL0003) 6 | PropertyInDesiredState = The property '{0}' is already in desired state. (DSSL0004) 7 | LegacySettingsInDesiredState = The DNS Server legacy settings are in desired state. (DSSL0005) 8 | '@ 9 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerZoneAging/DSC_DnsServerZoneAging.schema.mof: -------------------------------------------------------------------------------- 1 | [ClassVersion("1.0.0.0"), FriendlyName("DnsServerZoneAging")] 2 | class DSC_DnsServerZoneAging : OMI_BaseResource 3 | { 4 | [Key, Description("Name of the DNS forward or reverse lookup zone.")] String Name; 5 | [Required, Description("Option to enable scavenge stale resource records on the zone.")] Boolean Enabled; 6 | [Write, Description("Refresh interval for record scavenging in hours. Default value is `168`, 7 days.")] UInt32 RefreshInterval; 7 | [Write, Description("No-refresh interval for record scavenging in hours. Default value is `168`, 7 days.")] UInt32 NoRefreshInterval; 8 | }; 9 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerZoneAging/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | The DnsServerZoneAging DSC resource manages aging settings for a Domain Name System (DNS) server zone. 4 | 5 | A resource record can remain on a DNS server after the resource is no longer part of the network. Aging settings determine when a record can be removed, or scavenged, as a stale record. 6 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerZoneAging/en-US/DSC_DnsServerZoneAging.strings.psd1: -------------------------------------------------------------------------------- 1 | # culture="en-US" 2 | ConvertFrom-StringData @' 3 | GettingDnsZoneAgingMessage = Getting the DNS zone aging for {0}. 4 | EnableDnsZoneAgingMessage = Enable DNS zone aging on {0}. 5 | DisableDnsZoneAgingMessage = Disable DNS zone aging on {0}. 6 | SetDnsZoneRefreshIntervalMessage = Set DNS zone refresh interval to {0} hours. 7 | SetDnsZoneNoRefreshIntervalMessage = Set DNS zone no refresh interval to {0} hours. 8 | TestingDnsZoneAgingMessage = Testing the DNS zone aging for {0}. 9 | '@ 10 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerZoneScope/DSC_DnsServerZoneScope.schema.mof: -------------------------------------------------------------------------------- 1 | [ClassVersion("1.0.0.0"), FriendlyName("DnsServerZoneScope")] 2 | class DSC_DnsServerZoneScope : OMI_BaseResource 3 | { 4 | [Key, Description("Specifies the name of the Zone Scope.")] string Name; 5 | [Key, Description("Specify the existing DNS Zone to add a scope to.")] string ZoneName; 6 | [Write, Description("Should this DNS Server Zone Scope be present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; 7 | [Read, Description("Returns the zone scope filename.")] string ZoneFile; 8 | }; 9 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerZoneScope/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | The DnsServerZoneScope DSC resource manages the zone scope on an existing zone on the Domain Name System (DNS) server 4 | 5 | The name of the scope should adhere to the same conventions as the zone name. The scope name cannot be same as the zone name to which it is attached. 6 | 7 | ## Requirements 8 | 9 | - Target machine must be running Windows Server 2016 or later. 10 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerZoneScope/en-US/DSC_DnsServerZoneScope.strings.psd1: -------------------------------------------------------------------------------- 1 | # culture="en-US" 2 | ConvertFrom-StringData @' 3 | GettingDnsServerZoneScopeMessage = Getting DNS Server Zone Scope '{0}' in '{1}'. 4 | CreatingDnsServerZoneScopeMessage = Creating DNS Server Zone Scope '{0}' in '{1}'. 5 | RemovingDnsServerZoneScopeMessage = Removing DNS Server Zone Scope '{0}' from '{1}'. 6 | NotDesiredPropertyMessage = DNS Server Zone Scope property '{0}' is not correct. Expected '{1}', actual '{2}' 7 | InDesiredStateMessage = DNS Server Zone Scope '{0}' is in the desired state. 8 | NotInDesiredStateMessage = DNS Server Zone Scope '{0}' is NOT in the desired state. 9 | '@ 10 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerZoneTransfer/DSC_DnsServerZoneTransfer.schema.mof: -------------------------------------------------------------------------------- 1 | [ClassVersion("1.0.0.0"), FriendlyName("DnsServerZoneTransfer")] 2 | class DSC_DnsServerZoneTransfer : OMI_BaseResource 3 | { 4 | [Key, Description("Name of the DNS zone")] String Name; 5 | [Required, Description("Type of transfer allowed"), ValueMap{"None","Any","Named","Specific"}, Values{"None","Any","Named","Specific"}] String Type; 6 | [Write, Description("IP address or DNS name of DNS servers where zone information can be transferred")] String SecondaryServer[]; 7 | }; 8 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerZoneTransfer/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | The DnsServerZoneTransfer DSC resource manages the replication settings of DNS Server zone data between servers. 4 | -------------------------------------------------------------------------------- /source/DSCResources/DSC_DnsServerZoneTransfer/en-US/DSC_DnsServerZoneTransfer.strings.psd1: -------------------------------------------------------------------------------- 1 | # culture="en-US" 2 | ConvertFrom-StringData @' 3 | CheckingZoneMessage = Checking the current zone transfer for DNS server zone {0} ... 4 | DesiredZoneMessage = Current zone transfer settings for the given DNS server zone is correctly set to {0} 5 | NotDesiredZoneMessage = DNS server zone transfer settings is not correct. Expected {0}, actual {1} 6 | SetZoneMessage = Current zone transfer setting for DNS server zone {0} is set to {1} 7 | NotDesiredPropertyMessage = DNS server zone transfer secondary servers are not correct. Expected {0}, actual {1} 8 | SettingPropertyMessage = Setting DNS server zone transfer secondary servers to {0} ... 9 | SetPropertyMessage = DNS server zone transfer secondary servers are set 10 | '@ 11 | -------------------------------------------------------------------------------- /source/Enum/1.Ensure.ps1: -------------------------------------------------------------------------------- 1 | enum Ensure 2 | { 3 | Present 4 | Absent 5 | } 6 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordA/1-DnsRecordA_Mandatory_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID b23e6bb6-3260-4b43-9f09-8ccf166aa20e 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS A record exists when only the mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordA_Mandatory_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordA 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | Name = 'www' 52 | IPv4Address = '192.168.50.10' 53 | Ensure = 'Present' 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordA/2-DnsRecordA_Full_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 0a6f0709-abc7-4c00-8114-db016be73daf 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS A record exists when all properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordA_Full_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordA 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | Name = 'www' 52 | IPv4Address = '192.168.50.10' 53 | TimeToLive = '01:00:00' 54 | DnsServer = 'localhost' 55 | Ensure = 'Present' 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordA/3-DnsRecordA_Remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 7a72f2ec-1a64-4f78-8685-3f938639bd79 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS A record does not exist when mandatory properties are specified. 40 | 41 | Note that not all mandatory properties are necessarily key properties. Non-key property values will be ignored when determining whether the record is to be removed. 42 | #> 43 | 44 | Configuration DnsRecordA_Remove_config 45 | { 46 | Import-DscResource -ModuleName 'DnsServerDsc' 47 | 48 | Node localhost 49 | { 50 | DnsRecordA 'TestRecord' 51 | { 52 | ZoneName = 'contoso.com' 53 | Name = 'www' 54 | IPv4Address = '192.168.50.10' 55 | Ensure = 'Absent' 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordAScoped/1-DnsRecordAScoped_Mandatory_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 1ce0abc8-0dd1-4d61-9838-c837e811a97a 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS A record exists when only the mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordAScoped_Mandatory_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordAScoped 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | ZoneScope = 'external' 52 | Name = 'www' 53 | IPv4Address = '192.168.50.10' 54 | Ensure = 'Present' 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordAScoped/2-DnsRecordAScoped_Full_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 1c3b3a31-729e-4149-b1d8-28643074a442 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS A record exists when all properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordAScoped_Full_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordAScoped 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | ZoneScope = 'external' 52 | Name = 'www' 53 | IPv4Address = '192.168.50.10' 54 | TimeToLive = '01:00:00' 55 | DnsServer = 'localhost' 56 | Ensure = 'Present' 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordAScoped/3-DnsRecordAScoped_Remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 35577e76-36ce-4e73-a84c-2f872a08fe08 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS A record does not exist when mandatory properties are specified. 40 | 41 | Note that not all mandatory properties are necessarily key properties. Non-key property values will be ignored when determining whether the record is to be removed. 42 | #> 43 | 44 | Configuration DnsRecordAScoped_Remove_config 45 | { 46 | Import-DscResource -ModuleName 'DnsServerDsc' 47 | 48 | Node localhost 49 | { 50 | DnsRecordAScoped 'TestRecord' 51 | { 52 | ZoneName = 'contoso.com' 53 | ZoneScope = 'external' 54 | Name = 'www' 55 | IPv4Address = '192.168.50.10' 56 | Ensure = 'Absent' 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordAaaa/1-DnsRecordAaaa_Mandatory_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 61ba3071-04b7-42cd-93f5-96c29de7660a 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS AAAA record exists when only the mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordAaaa_Mandatory_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordAaaa 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | Name = 'www' 52 | IPv6Address = '2001:db8:85a3::8a2e:370:7334' 53 | Ensure = 'Present' 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordAaaa/2-DnsRecordAaaa_Full_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 2cb7551d-fd78-4b6e-bf34-7034fde13f68 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS AAAA record exists when all properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordAaaa_Full_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordAaaa 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | Name = 'www' 52 | IPv6Address = '2001:db8:85a3::8a2e:370:7334' 53 | TimeToLive = '01:00:00' 54 | DnsServer = 'localhost' 55 | Ensure = 'Present' 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordAaaa/3-DnsRecordAaaa_Remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 93017cb7-dcf6-4b84-989b-a954bd43f93a 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS AAAA record does not exist when mandatory properties are specified. 40 | 41 | Note that not all mandatory properties are necessarily key properties. Non-key property values will be ignored when determining whether the record is to be removed. 42 | #> 43 | 44 | Configuration DnsRecordAaaa_Remove_config 45 | { 46 | Import-DscResource -ModuleName 'DnsServerDsc' 47 | 48 | Node localhost 49 | { 50 | DnsRecordAaaa 'TestRecord' 51 | { 52 | ZoneName = 'contoso.com' 53 | Name = 'www' 54 | IPv6Address = '2001:db8:85a3::8a2e:370:7334' 55 | Ensure = 'Absent' 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordAaaaScoped/1-DnsRecordAaaaScoped_Mandatory_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID af780b5e-4582-4e8c-8a79-c7e6fb8e723c 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS AAAA record exists when only the mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordAaaaScoped_Mandatory_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordAaaaScoped 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | ZoneScope = 'external' 52 | Name = 'www' 53 | IPv6Address = '2001:db8:85a3::8a2e:370:7334' 54 | Ensure = 'Present' 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordAaaaScoped/2-DnsRecordAaaaScoped_Full_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 1204615c-f269-4f35-ae27-d659538ab1dc 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS AAAA record exists when all properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordAaaaScoped_Full_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordAaaaScoped 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | ZoneScope = 'external' 52 | Name = 'www' 53 | IPv6Address = '2001:db8:85a3::8a2e:370:7334' 54 | TimeToLive = '01:00:00' 55 | DnsServer = 'localhost' 56 | Ensure = 'Present' 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordAaaaScoped/3-DnsRecordAaaaScoped_Remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID a43021db-e8e8-47c2-b1c7-ca777921b46b 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS AAAA record does not exist when mandatory properties are specified. 40 | 41 | Note that not all mandatory properties are necessarily key properties. Non-key property values will be ignored when determining whether the record is to be removed. 42 | #> 43 | 44 | Configuration DnsRecordAaaaScoped_Remove_config 45 | { 46 | Import-DscResource -ModuleName 'DnsServerDsc' 47 | 48 | Node localhost 49 | { 50 | DnsRecordAaaaScoped 'TestRecord' 51 | { 52 | ZoneName = 'contoso.com' 53 | ZoneScope = 'external' 54 | Name = 'www' 55 | IPv6Address = '2001:db8:85a3::8a2e:370:7334' 56 | Ensure = 'Absent' 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordCNAME/1-DnsRecordCname_Mandatory_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID ea5de1b3-6167-4b3b-8de2-c57355d04202 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS CNAME record exists when only the mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordCname_Mandatory_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordCname 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | Name = 'bar' 52 | HostNameAlias = 'quarks.contoso.com' 53 | Ensure = 'Present' 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordCNAME/2-DnsRecordCname_Full_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 73611f8c-d592-4b11-9058-d6209313e85b 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS CNAME record exists when all properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordCname_Full_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordCname 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | Name = 'bar' 52 | HostNameAlias = 'quarks.contoso.com' 53 | TimeToLive = '01:00:00' 54 | DnsServer = 'localhost' 55 | Ensure = 'Present' 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordCNAME/3-DnsRecordCname_Remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID ca733355-28aa-4152-854b-a780fb1cfb37 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS CNAME record does not exist when mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordCname_Remove_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordCname 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | Name = 'bar' 52 | HostNameAlias = 'quarks.contoso.com' 53 | Ensure = 'Absent' 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordCNAMEScoped/1-DnsRecordCnameScoped_Mandatory_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID b31b9086-2153-49c9-8c53-90a0901f4588 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS CNAME record exists when only the mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordCnameScoped_Mandatory_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordCnameScoped 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | ZoneScope = 'external' 52 | Name = 'bar' 53 | HostNameAlias = 'quarks.contoso.com' 54 | Ensure = 'Present' 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordCNAMEScoped/2-DnsRecordCnameScoped_Full_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 581d5c23-0acd-4f3b-9281-2bcc86928db7 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS CNAME record exists when all properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordCnameScoped_Full_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordCnameScoped 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | ZoneScope = 'external' 52 | Name = 'bar' 53 | HostNameAlias = 'quarks.contoso.com' 54 | TimeToLive = '01:00:00' 55 | DnsServer = 'localhost' 56 | Ensure = 'Present' 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordCNAMEScoped/3-DnsRecordCnameScoped_Remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID b9c01d28-d608-43ce-b5c1-4baf57ea3118 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS CNAME record does not exist when mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordCnameScoped_Remove_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordCnameScoped 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | ZoneScope = 'external' 52 | Name = 'bar' 53 | HostNameAlias = 'quarks.contoso.com' 54 | Ensure = 'Absent' 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordMx/1-DnsRecordMx_Mandatory_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 827c2d22-ccf3-4873-9e06-16c0a0815adb 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS MX record exists when only the mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordMx_Mandatory_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordMx 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | EmailDomain = 'contoso.com' 52 | MailExchange = 'mailserver1.contoso.com' 53 | Priority = 20 54 | Ensure = 'Present' 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordMx/2-DnsRecordMx_Full_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID e82270f4-80a0-4860-821c-2a2d59ce5e66 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS MX record exists when all properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordMx_Full_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordMx 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | EmailDomain = 'contoso.com' 52 | MailExchange = 'mailserver1.contoso.com' 53 | Priority = 20 54 | TimeToLive = '01:00:00' 55 | DnsServer = 'localhost' 56 | Ensure = 'Present' 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordMx/3-DnsRecordMx_Remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 6de18004-af6f-4e04-9ca3-bb7af84b09c3 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS MX record does not exist when mandatory properties are specified. 40 | 41 | Note that the 'Priority' property value will be ignored when determining whether the record is to be removed. 42 | #> 43 | 44 | Configuration DnsRecordMx_Remove_config 45 | { 46 | Import-DscResource -ModuleName 'DnsServerDsc' 47 | 48 | Node localhost 49 | { 50 | DnsRecordMx 'TestRecord' 51 | { 52 | ZoneName = 'contoso.com' 53 | EmailDomain = 'contoso.com' 54 | MailExchange = 'mailserver1.contoso.com' 55 | Priority = 20 56 | Ensure = 'Absent' 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordMxScoped/1-DnsRecordMxScoped_Mandatory_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 4c37d080-e91b-4f6b-b453-01a4347ede25 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS MX record exists when only the mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordMxScoped_Mandatory_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordMxScoped 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | ZoneScope = 'external' 52 | EmailDomain = 'contoso.com' 53 | MailExchange = 'mailserver1.contoso.com' 54 | Priority = 20 55 | Ensure = 'Present' 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordMxScoped/2-DnsRecordMxScoped_Full_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID d03cdd7e-495c-4e74-be28-1dda705bb1be 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS MX record exists when all properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordMxScoped_Full_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordMxScoped 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | ZoneScope = 'external' 52 | EmailDomain = 'contoso.com' 53 | MailExchange = 'mailserver1.contoso.com' 54 | Priority = 20 55 | TimeToLive = '01:00:00' 56 | DnsServer = 'localhost' 57 | Ensure = 'Present' 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordMxScoped/3-DnsRecordMxScoped_Remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 41768e50-4338-4a4f-8b5c-2d49e6cbd248 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS MX record does not exist when mandatory properties are specified. 40 | 41 | Note that the 'Priority' property value will be ignored when determining whether the record is to be removed. 42 | #> 43 | 44 | Configuration DnsRecordMxScoped_Remove_config 45 | { 46 | Import-DscResource -ModuleName 'DnsServerDsc' 47 | 48 | Node localhost 49 | { 50 | DnsRecordMxScoped 'TestRecord' 51 | { 52 | ZoneName = 'contoso.com' 53 | ZoneScope = 'external' 54 | EmailDomain = 'contoso.com' 55 | MailExchange = 'mailserver1.contoso.com' 56 | Priority = 20 57 | Ensure = 'Absent' 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordNs/1-DnsRecordNs_Mandatory_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 308f2896-a19f-42bf-a371-140418850175 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS NS record exists when only the mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordNs_Mandatory_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordNs 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | DomainName = 'contoso.com' 52 | NameServer = 'ns.contoso.com' 53 | Ensure = 'Present' 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordNs/2-DnsRecordNs_Full_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 8479b7e8-d244-4eda-9725-c5d8a9ca0b97 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS NS record exists when all properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordNs_Full_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordNs 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | DomainName = 'contoso.com' 52 | NameServer = 'ns.contoso.com' 53 | TimeToLive = '01:00:00' 54 | DnsServer = 'localhost' 55 | Ensure = 'Present' 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordNs/3-DnsRecordNs_Remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 4f3e8876-fcae-4e1f-a879-fbde1b1fe56c 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS NS record does not exist when mandatory properties are specified. 40 | 41 | Note that not all mandatory properties are necessarily key properties. Non-key property values will be ignored when determining whether the record is to be removed. 42 | #> 43 | 44 | Configuration DnsRecordNs_Remove_config 45 | { 46 | Import-DscResource -ModuleName 'DnsServerDsc' 47 | 48 | Node localhost 49 | { 50 | DnsRecordNs 'TestRecord' 51 | { 52 | ZoneName = 'contoso.com' 53 | DomainName = 'contoso.com' 54 | NameServer = 'ns.contoso.com' 55 | Ensure = 'Absent' 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordNsScoped/1-DnsRecordNsScoped_Mandatory_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID deff6e75-397f-46c8-b52c-9f60c6418783 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS NS record exists when only the mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordNsScoped_Mandatory_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordNsScoped 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | ZoneScope = 'external' 52 | DomainName = 'contoso.com' 53 | NameServer = 'ns.contoso.com' 54 | Ensure = 'Present' 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordNsScoped/2-DnsRecordNsScoped_Full_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID b564652c-9a98-4e18-9ce9-913e21d30a5a 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS NS record exists when all properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordNsScoped_Full_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordNsScoped 'TestRecord' 49 | { 50 | ZoneName = 'contoso.com' 51 | ZoneScope = 'external' 52 | DomainName = 'contoso.com' 53 | NameServer = 'ns.contoso.com' 54 | TimeToLive = '01:00:00' 55 | DnsServer = 'localhost' 56 | Ensure = 'Present' 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordNsScoped/3-DnsRecordNsScoped_Remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 3088e993-8937-4103-a6a8-779760316177 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS NS record does not exist when mandatory properties are specified. 40 | 41 | Note that not all mandatory properties are necessarily key properties. Non-key property values will be ignored when determining whether the record is to be removed. 42 | #> 43 | 44 | Configuration DnsRecordNsScoped_Remove_config 45 | { 46 | Import-DscResource -ModuleName 'DnsServerDsc' 47 | 48 | Node localhost 49 | { 50 | DnsRecordNsScoped 'TestRecord' 51 | { 52 | ZoneName = 'contoso.com' 53 | ZoneScope = 'external' 54 | DomainName = 'contoso.com' 55 | NameServer = 'ns.contoso.com' 56 | Ensure = 'Absent' 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordPtr/1-DnsRecordPtr_Mandatory_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 1133365f-c781-4f18-9cb5-96ca1c282c87 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS PTR record exists when only the mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordPtr_Mandatory_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordPtr 'TestRecord' 49 | { 50 | ZoneName = '0.168.192.in-addr.arpa' 51 | IpAddress = '192.168.0.9' 52 | Name = 'quarks.contoso.com' 53 | Ensure = 'Present' 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordPtr/2-DnsRecordPtr_Full_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 5aa5cffa-4e3a-4861-b601-73f234015bc9 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS PTR record exists when all properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordPtr_Full_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordPtr 'TestRecord' 49 | { 50 | ZoneName = '0.168.192.in-addr.arpa' 51 | IpAddress = '192.168.0.9' 52 | Name = 'quarks.contoso.com' 53 | TimeToLive = '01:00:00' 54 | DnsServer = 'localhost' 55 | Ensure = 'Present' 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordPtr/3-DnsRecordPtr_Remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 35a2f156-e302-4d56-a41b-a2e9a05a4de6 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS PTR record does not exist when mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordPtr_Remove_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordPtr 'TestRecord' 49 | { 50 | ZoneName = '0.168.192.in-addr.arpa' 51 | IpAddress = '192.168.0.9' 52 | Name = 'quarks.contoso.com' 53 | Ensure = 'Absent' 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordPtr/4-DnsRecordPtr_Mandatory_v6_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 954ac80d-0b21-43fa-911c-2bd875bfba36 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS PTR record exists for an IPv6 address when only the mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordPtr_Mandatory_v6_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordPtr 'TestRecord' 49 | { 50 | ZoneName = '0.0.d.f.ip6.arpa' 51 | IpAddress = 'fd00::515c:0:0:d59' 52 | Name = 'quarks.contoso.com' 53 | Ensure = 'Present' 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordPtr/5-DnsRecordPtr_Full_v6_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID f8172f8a-c8bd-4be3-a0ca-c636472ca31c 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS PTR record exists for an IPv6 address when all properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordPtr_Full_v6_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordPtr 'TestRecord' 49 | { 50 | ZoneName = '0.0.d.f.ip6.arpa' 51 | IpAddress = 'fd00::515c:0:0:d59' 52 | Name = 'quarks.contoso.com' 53 | TimeToLive = '01:00:00' 54 | DnsServer = 'localhost' 55 | Ensure = 'Present' 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordPtr/6-DnsRecordPtr_Remove_v6_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 6f460efd-2757-442e-82ad-b28c78c0746a 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS PTR record does not exist for an IPv6 address when mandatory properties are specified. 40 | #> 41 | 42 | Configuration DnsRecordPtr_Remove_v6_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsRecordPtr 'TestRecord' 49 | { 50 | ZoneName = '0.0.d.f.ip6.arpa' 51 | IpAddress = 'fd00::515c:0:0:d59' 52 | Name = 'quarks.contoso.com' 53 | Ensure = 'Absent' 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordSrv/1-DnsRecordSrv_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID c27bfa6b-42a8-4734-82ee-b4e2a3310297 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS SRV record exists for 40 | XMPP that points to chat.contoso.com with a priority 41 | of 10, weight of 20. 42 | #> 43 | 44 | Configuration DnsRecordSrv_config 45 | { 46 | Import-DscResource -ModuleName 'DnsServerDsc' 47 | 48 | Node localhost 49 | { 50 | DnsRecordSrv 'TestRecord' 51 | { 52 | ZoneName = 'contoso.com' 53 | SymbolicName = 'xmpp' 54 | Protocol = 'tcp' 55 | Port = 5222 56 | Target = 'chat.contoso.com' 57 | Priority = 10 58 | Weight = 20 59 | Ensure = 'Present' 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordSrv/2-DnsRecordSrv_full_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 555d7dc1-b319-47ee-88dd-44c7e879210e 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS SRV record exists for 40 | XMPP that points to chat.contoso.com with a priority of 20, 41 | weight of 50 and TTL of 5 hours. 42 | #> 43 | 44 | Configuration DnsRecordSrv_full_config 45 | { 46 | Import-DscResource -ModuleName 'DnsServerDsc' 47 | 48 | Node localhost 49 | { 50 | DnsRecordSrv 'TestRecord Full' 51 | { 52 | ZoneName = 'contoso.com' 53 | SymbolicName = 'xmpp' 54 | Protocol = 'tcp' 55 | Port = 5222 56 | Target = 'chat.contoso.com' 57 | Priority = 20 58 | Weight = 50 59 | TimeToLive = '05:00:00' 60 | Ensure = 'Present' 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordSrv/3-DnsRecordSrv_Remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 15bc7a38-3194-46f5-9b8d-c9f77a229138 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will remove a specified DNS SRV record. Note that 40 | Priority and Weight are mandatory attributes, but their values are not 41 | used to determine which record to remove. 42 | #> 43 | 44 | Configuration DnsRecordSrv_Remove_config 45 | { 46 | Import-DscResource -ModuleName 'DnsServerDsc' 47 | 48 | Node localhost 49 | { 50 | DnsRecordSrv 'RemoveTestRecord' 51 | { 52 | ZoneName = 'contoso.com' 53 | SymbolicName = 'xmpp' 54 | Protocol = 'tcp' 55 | Port = 5222 56 | Target = 'chat.contoso.com' 57 | Priority = 0 58 | Weight = 0 59 | Ensure = 'Absent' 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordSrvScoped/1-DnsRecordSrvScoped_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 0292973b-1c0d-4738-983b-d1e08f00b718 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS SRV record exists 40 | in the external scope for XMPP that points to 41 | chat.contoso.com with a priority of 10, weight of 20. 42 | #> 43 | 44 | Configuration DnsRecordSrvScoped_config 45 | { 46 | Import-DscResource -ModuleName 'DnsServerDsc' 47 | 48 | Node localhost 49 | { 50 | DnsRecordSrvScoped 'TestRecord' 51 | { 52 | ZoneName = 'contoso.com' 53 | ZoneScope = 'external' 54 | SymbolicName = 'xmpp' 55 | Protocol = 'tcp' 56 | Port = 5222 57 | Target = 'chat.contoso.com' 58 | Priority = 10 59 | Weight = 20 60 | Ensure = 'Present' 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordSrvScoped/2-DnsRecordSrvScoped_full_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID d8bc6d0b-3a0e-4929-944a-3b25bf0d6bc5 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will ensure a DNS SRV record exists in the 40 | external scope for XMPP that points to chat.contoso.com with 41 | a priority of 20, weight of 50 and Time To Live of 5 hours. 42 | #> 43 | 44 | Configuration DnsRecordSrvScoped_full_config 45 | { 46 | Import-DscResource -ModuleName 'DnsServerDsc' 47 | 48 | Node localhost 49 | { 50 | DnsRecordSrvScoped 'TestRecord Full' 51 | { 52 | ZoneName = 'contoso.com' 53 | ZoneScope = 'external' 54 | SymbolicName = 'xmpp' 55 | Protocol = 'tcp' 56 | Port = 5222 57 | Target = 'chat.contoso.com' 58 | Priority = 20 59 | Weight = 50 60 | TimeToLive = '05:00:00' 61 | Ensure = 'Present' 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsRecordSrvScoped/3-DnsRecordSrvScoped_Remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID cfd82a76-3897-472d-9076-5010a93bdde4 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will remove a specified DNS SRV record in the 40 | external scope. Note that Priority and Weight are mandatory 41 | attributes, but their values are not used to determine which 42 | record to remove. 43 | #> 44 | 45 | Configuration DnsRecordSrvScoped_Remove_config 46 | { 47 | Import-DscResource -ModuleName 'DnsServerDsc' 48 | 49 | Node localhost 50 | { 51 | DnsRecordSrvScoped 'RemoveTestRecord' 52 | { 53 | ZoneName = 'contoso.com' 54 | ZoneScope = 'external' 55 | SymbolicName = 'xmpp' 56 | Protocol = 'tcp' 57 | Port = 5222 58 | Target = 'chat.contoso.com' 59 | Priority = 0 60 | Weight = 0 61 | Ensure = 'Absent' 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerADZone/1-DnsServerADZone_forward_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 29742cc1-70f3-48e3-9494-f454afe77283 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will manage an AD integrated DNS forward lookup zone 40 | #> 41 | 42 | Configuration DnsServerADZone_forward_config 43 | { 44 | param 45 | ( 46 | [System.Management.Automation.PSCredential] 47 | $Credential 48 | ) 49 | 50 | Import-DscResource -ModuleName 'DnsServerDsc' 51 | 52 | Node localhost 53 | { 54 | 55 | DnsServerADZone 'AddForwardADZone' 56 | { 57 | Name = 'MyDomainName.com' 58 | DynamicUpdate = 'Secure' 59 | ReplicationScope = 'Forest' 60 | ComputerName = 'MyDnsServer.MyDomain.com' 61 | Credential = $Credential 62 | Ensure = 'Present' 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerADZone/2-DnsServerADZone_reverse_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 35660425-c657-4d31-a89e-a163013b726a 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will manage an AD integrated DNS reverse lookup zone 40 | #> 41 | 42 | Configuration DnsServerADZone_reverse_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerADZone 'addReverseADZone' 49 | { 50 | Name = '1.168.192.in-addr.arpa' 51 | DynamicUpdate = 'Secure' 52 | ReplicationScope = 'Forest' 53 | Ensure = 'Present' 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerCache/1-DnsServerCache_SetCacheSettings_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 111f4eb8-c85f-4112-b8f2-f014420ec1ce 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will change the cache settings on the DNS server. 39 | #> 40 | 41 | Configuration DnsServerCache_SetCacheSettings_Config 42 | { 43 | Import-DscResource -ModuleName 'DnsServerDsc' 44 | 45 | Node localhost 46 | { 47 | DnsServerCache 'SetCacheSettings' 48 | { 49 | DnsServer = 'localhost' 50 | EnablePollutionProtection = $true 51 | StoreEmptyAuthenticationResponse = $true 52 | IgnorePolicies = $false 53 | LockingPercent = 100 54 | MaxKBSize = 0 55 | MaxNegativeTtl = '00:15:00' 56 | MaxTtl = '1.00:00:00' 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerClientSubnet/1-DnsServerClientSubnet_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 192b2a8c-2e8a-470c-8558-2da70c3b8793 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will manage a DNS client subnet 40 | #> 41 | 42 | Configuration DnsServerClientSubnet_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerClientSubnet 'ClientSubnet1' 49 | { 50 | Name = 'London' 51 | IPv4Subnet = @('10.1.0.0/16', '10.8.0.0/16') 52 | Ensure = 'Present' 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerConditionalForwarder/1-DnsServerConditionalForwarder_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 0c684a3b-01fd-4759-8686-ea9a82d76aab 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will manage a DNS server conditional forwarder 40 | #> 41 | 42 | Configuration DnsServerConditionalForwarder_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerConditionalForwarder 'Forwarder1' 49 | { 50 | Name = 'London' 51 | MasterServers = @('10.0.1.10', '10.0.2.10') 52 | ReplicationScope = 'Forest' 53 | Ensure = 'Present' 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerDsSetting/1-DnsServerDsSetting_DirectoryPartitionAutoEnlistInterval_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID a822d4a5-c575-45f9-ba1a-aaea21a43c00 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will change the Directory Partition Auto Enlist 39 | Interval in Active Directory. 40 | #> 41 | 42 | configuration DnsServerDsSetting_DirectoryPartitionAutoEnlistInterval_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | node localhost 47 | { 48 | DnsServerDsSetting 'Integration_Test' 49 | { 50 | DnsServer = 'localhost' 51 | DirectoryPartitionAutoEnlistInterval = '1.00:00:00' 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerDsSetting/2-DnsServerDsSetting_LazyUpdateInterval_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 57cdc411-d737-4dc2-9ede-86ffea596094 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will change the Lazy Update 39 | Interval in Active Directory. 40 | #> 41 | 42 | configuration DnsServerDsSetting_LazyUpdateInterval_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | node localhost 47 | { 48 | DnsServerDsSetting 'Integration_Test' 49 | { 50 | DnsServer = 'localhost' 51 | LazyUpdateInterval = 3 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerDsSetting/3-DnsServerDsSetting_MinimumBackgroundLoadThreads_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 0feef9f4-1d8f-4d56-be15-7599cf2ed3b2 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will change the Minimum Background Load Threads 39 | in Active Directory. 40 | #> 41 | 42 | configuration DnsServerDsSetting_MinimumBackgroundLoadThreads_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | node localhost 47 | { 48 | DnsServerDsSetting 'Integration_Test' 49 | { 50 | DnsServer = 'localhost' 51 | MinimumBackgroundLoadThreads = 1 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerDsSetting/4-DnsServerDsSetting_PollingInterval_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID a3fe8c61-350d-4ac3-b9ac-d4ebcb6a5aaf 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will change the Polling 39 | Interval in Active Directory. 40 | #> 41 | 42 | configuration DnsServerDsSetting_PollingInterval_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | node localhost 47 | { 48 | DnsServerDsSetting 'Integration_Test' 49 | { 50 | DnsServer = 'localhost' 51 | PollingInterval = 180 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerDsSetting/5-DnsServerDsSetting_RemoteReplicationDelay_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID d251e713-716d-4305-a7e0-136ae5083ad6 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will change the Remote Replication Delay 39 | in Active Directory. 40 | #> 41 | 42 | configuration DnsServerDsSetting_RemoteReplicationDelay_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | node localhost 47 | { 48 | DnsServerDsSetting 'Integration_Test' 49 | { 50 | DnsServer = 'localhost' 51 | RemoteReplicationDelay = 30 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerDsSetting/6-DnsServerDsSetting_TombstoneInterval_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID de58ff19-8b02-4bf9-8742-a5846e44599c 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will change the DNS Tombstone 39 | Interval in Active Directory. 40 | #> 41 | 42 | configuration DnsServerDsSetting_TombstoneInterval_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | node localhost 47 | { 48 | DnsServerDsSetting 'Integration_Test' 49 | { 50 | DnsServer = 'localhost' 51 | TombstoneInterval = '14.00:00:00' 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerDsSetting/7-DnsServerDsSetting_All_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID b20e9d5c-ba74-4686-9293-08077e53cb8f 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will set all Active Directory-based DNS settings on 39 | the specified server. 40 | #> 41 | 42 | configuration DnsServerDsSetting_All_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | node localhost 47 | { 48 | DnsServerDsSetting 'Integration_Test' 49 | { 50 | DnsServer = 'localhost' 51 | DirectoryPartitionAutoEnlistInterval = '1.00:00:00' 52 | LazyUpdateInterval = 3 53 | MinimumBackgroundLoadThreads = 1 54 | PollingInterval = 180 55 | RemoteReplicationDelay = 30 56 | TombstoneInterval = '14.00:00:00' 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerEDns/1-DnsServerEDns_SetCacheTimeout_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 95d58494-7f07-4893-9afd-df5afc2a0509 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will change the cache timeout for 39 | extension mechanisms for DNS (EDNS) on the DNS server. 40 | #> 41 | 42 | Configuration DnsServerEDns_SetCacheTimeout_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerEDns 'SetCacheTimeout' 49 | { 50 | DnsServer = 'localhost' 51 | CacheTimeout = '00:15:00' 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerEDns/2-DnsServerEDns_EnableProbes_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID a6427353-df6b-407f-b35c-1aa98822f286 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will enable probes for the extension mechanisms for DNS 39 | (EDNS) on the DNS server. 40 | #> 41 | 42 | Configuration DnsServerEDns_EnableProbes_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerEDns 'EnableProbes' 49 | { 50 | DnsServer = 'localhost' 51 | EnableProbes = $true 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerEDns/3-DnsServerEDns_EnableReception_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 81765a8e-1b23-4199-9a39-b254807ad129 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will allow to accepts queries for the extension mechanisms 39 | for DNS (EDNS) on the DNS server. 40 | #> 41 | 42 | Configuration DnsServerEDns_EnableReception_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerEDns 'EnableReception' 49 | { 50 | DnsServer = 'localhost' 51 | EnableReception = $true 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerForwarder/1-DnsServerForwarder_set_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 372199ea-f1c8-47cd-aa86-90f1d91fc7b4 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will set the DNS forwarders 40 | #> 41 | 42 | Configuration DnsServerForwarder_set_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | 49 | DnsServerForwarder 'SetForwarders' 50 | { 51 | IsSingleInstance = 'Yes' 52 | IPAddresses = @('192.168.0.10', '192.168.0.11') 53 | UseRootHint = $false 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerForwarder/2-DnsServerForwarder_remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 5e7aa23a-52c8-494f-8118-dbec5cd22f76 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will remove all the DNS forwarders 40 | #> 41 | 42 | Configuration DnsServerForwarder_remove_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerForwarder 'SetForwarders' 49 | { 50 | IsSingleInstance = 'Yes' 51 | IPAddresses = @() 52 | UseRootHint = $false 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerForwarder/3-DnsServerForwarder_SetUseRootHint_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 0253542b-7448-4379-8272-fed7babe5e1d 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will remove all the DNS forwarders 40 | #> 41 | 42 | Configuration DnsServerForwarder_SetUseRootHint_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerForwarder 'SetUseRootHints' 49 | { 50 | IsSingleInstance = 'Yes' 51 | UseRootHint = $true 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerForwarder/4-DnsServerForwarder_EnableReordering_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 43671215-6adc-4a8f-89f4-5c8f53f8a622 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will set the DNS forwarders and enable dynamic reordering. 40 | #> 41 | 42 | Configuration DnsServerForwarder_EnableReordering_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerForwarder 'SetUseRootHints' 49 | { 50 | IsSingleInstance = 'Yes' 51 | IPAddresses = @('192.168.0.10', '192.168.0.11') 52 | UseRootHint = $false 53 | EnableReordering = $true 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerForwarder/5-DnsServerForwarder_DisableReordering_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 0505a331-6572-40f5-984a-49ee8a53366c 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will set the DNS forwarders and disable dynamic reordering. 40 | #> 41 | 42 | Configuration DnsServerForwarder_DisableReordering_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerForwarder 'SetUseRootHints' 49 | { 50 | IsSingleInstance = 'Yes' 51 | IPAddresses = @('192.168.0.10', '192.168.0.11') 52 | UseRootHint = $false 53 | EnableReordering = $false 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerForwarder/6-DnsServerForwarder_SetTimeout_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID c2230aa1-dd2b-4083-ae0a-eeec48a01e72 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will set the DNS forwarders and disable dynamic reordering. 40 | #> 41 | 42 | Configuration DnsServerForwarder_SetTimeout_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerForwarder 'SetUseRootHints' 49 | { 50 | IsSingleInstance = 'Yes' 51 | IPAddresses = @('192.168.0.10', '192.168.0.11') 52 | UseRootHint = $false 53 | Timeout = 10 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerPrimaryZone/1-DnsServerPrimaryZone_AddClassfulReversePrimaryZone_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID e1c43a56-e5b2-4755-aa08-d81c72530fc6 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will add a file-backed classful reverse primary zone 39 | using the resource default parameter values. 40 | #> 41 | Configuration DnsServerPrimaryZone_AddClassfulReversePrimaryZone_Config 42 | { 43 | Import-DscResource -ModuleName 'DnsServerDsc' 44 | 45 | Node localhost 46 | { 47 | DnsServerPrimaryZone 'AddPrimaryZone' 48 | { 49 | Name = '1.168.192.in-addr.arpa' 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerPrimaryZone/2-DnsServerPrimaryZone_AddClasslessReversePrimaryZone_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 00bc0e3f-ef18-41a1-94fd-940414e6abd2 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will add a file-backed classless reverse primary zone 39 | using the resource default parameter values. 40 | #> 41 | Configuration DnsServerPrimaryZone_AddClasslessReversePrimaryZone_Config 42 | { 43 | Import-DscResource -ModuleName 'DnsServerDsc' 44 | 45 | Node localhost 46 | { 47 | DnsServerPrimaryZone 'AddPrimaryZone' 48 | { 49 | Name = '64-26.100.168.192.in-addr.arpa' 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerPrimaryZone/3-DnsServerPrimaryZone_AddPrimaryZoneUsingDefaults_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 11891a8c-6535-4535-a9b1-8c00792d8574 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will add a file-backed primary zone using the resource 39 | default parameter values. 40 | #> 41 | Configuration DnsServerPrimaryZone_AddPrimaryZoneUsingDefaults_Config 42 | { 43 | Import-DscResource -ModuleName 'DnsServerDsc' 44 | 45 | Node localhost 46 | { 47 | DnsServerPrimaryZone 'AddPrimaryZone' 48 | { 49 | Name = 'demo.contoso.com' 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerPrimaryZone/4-DnsServerPrimaryZone_AddPrimaryZoneWithSpecificValues_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 688044b2-8b87-4141-bb59-199f543096ed 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will add a file-backed primary zone using the resource 39 | default parameter values. 40 | #> 41 | Configuration DnsServerPrimaryZone_AddPrimaryZoneWithSpecificValues_Config 42 | { 43 | Import-DscResource -ModuleName 'DnsServerDsc' 44 | 45 | Node localhost 46 | { 47 | DnsServerPrimaryZone 'AddPrimaryZone' 48 | { 49 | Ensure = 'Present' 50 | Name = 'demo.contoso.com' 51 | ZoneFile = 'demo.contoso.com.dns' 52 | DynamicUpdate = 'NonSecureAndSecure' 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerPrimaryZone/5-DnsServerPrimaryZone_RemovePrimaryZone_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 939afc66-89ba-40c1-8c46-831a97ccde29 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will remove a file-backed primary zone. 39 | #> 40 | Configuration DnsServerPrimaryZone_RemovePrimaryZone_Config 41 | { 42 | Import-DscResource -ModuleName 'DnsServerDsc' 43 | 44 | Node localhost 45 | { 46 | DnsServerPrimaryZone 'RemovePrimaryZone' 47 | { 48 | Ensure = 'Absent' 49 | Name = 'demo.contoso.com' 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerPrimaryZone/6-DnsServerPrimaryZone_RemoveReversePrimaryZone_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID aadc72a0-e2f7-4fb0-a5f0-cf24b8edd702 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will remove a file-backed primary zone. 39 | #> 40 | Configuration DnsServerPrimaryZone_RemoveReversePrimaryZone_Config 41 | { 42 | Import-DscResource -ModuleName 'DnsServerDsc' 43 | 44 | Node localhost 45 | { 46 | DnsServerPrimaryZone 'RemovePrimaryZone' 47 | { 48 | Ensure = 'Absent' 49 | Name = '1.168.192.in-addr.arpa' 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerRootHint/1-DnsServerRootHint_set_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID daed7803-24e2-4896-a366-37d061ae173d 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will manage the DNS server root hints 40 | #> 41 | 42 | Configuration DnsServerRootHint_set_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerRootHint 'RootHints' 49 | { 50 | IsSingleInstance = 'Yes' 51 | NameServer = @{ 52 | 'A.ROOT-SERVERS.NET.' = '2001:503:ba3e::2:30' 53 | 'B.ROOT-SERVERS.NET.' = '2001:500:84::b' 54 | 'C.ROOT-SERVERS.NET.' = '2001:500:2::c' 55 | 'D.ROOT-SERVERS.NET.' = '2001:500:2d::d' 56 | 'E.ROOT-SERVERS.NET.' = '192.203.230.10' 57 | 'F.ROOT-SERVERS.NET.' = '2001:500:2f::f' 58 | 'G.ROOT-SERVERS.NET.' = '192.112.36.4' 59 | 'H.ROOT-SERVERS.NET.' = '2001:500:1::53' 60 | 'I.ROOT-SERVERS.NET.' = '2001:7fe::53' 61 | 'J.ROOT-SERVERS.NET.' = '2001:503:c27::2:30' 62 | 'K.ROOT-SERVERS.NET.' = '2001:7fd::1' 63 | 'L.ROOT-SERVERS.NET.' = '2001:500:9f::42' 64 | 'M.ROOT-SERVERS.NET.' = '2001:dc3::353' 65 | } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerRootHint/2-DnsServerRootHint_remove_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID d46969db-5d53-47f2-a70f-2b967a42fd51 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will remove the DNS server root hints 40 | #> 41 | 42 | Configuration DnsServerRootHint_remove_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerRootHint 'RootHints' 49 | { 50 | IsSingleInstance = 'Yes' 51 | NameServer = @{ } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerScavenging/1-DnsServerScavenging_EnableAndChangeScavengingIntervals_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 74a3fe1e-4094-4c78-b815-154c1907e54d 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will enable scavenging and change the scavenging intervals 39 | on the DNS server. 40 | #> 41 | 42 | Configuration DnsServerScavenging_EnableAndChangeScavengingIntervals_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerScavenging 'EnableScavengingAndChangeIntervals' 49 | { 50 | DnsServer = 'localhost' 51 | ScavengingState = $true 52 | ScavengingInterval = '7.00:00:00' 53 | RefreshInterval = '7.00:00:00' 54 | NoRefreshInterval = '7.00:00:00' 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerScavenging/2-DnsServerScavenging_EnableScavenging_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID e3aeafd4-b41a-48e0-b9be-9b5c01f904d3 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will enable scavenging on the DNS server, using 39 | the default interval values. 40 | #> 41 | 42 | Configuration DnsServerScavenging_EnableScavenging_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerScavenging 'EnableScavenging' 49 | { 50 | DnsServer = 'localhost' 51 | ScavengingState = $true 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerScavenging/3-DnsServerScavenging_ChangeScavengingIntervals_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID f148c0eb-fb6e-4c31-bccb-5ed304545b0d 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will change scavenging intervals on the DNS server, but 39 | does not enforce that scavenging is enabled. 40 | #> 41 | 42 | Configuration DnsServerScavenging_ChangeScavengingIntervals_Config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerScavenging 'ChangeScavengingIntervals' 49 | { 50 | DnsServer = 'localhost' 51 | ScavengingInterval = '7.00:00:00' 52 | RefreshInterval = '7.00:00:00' 53 | NoRefreshInterval = '7.00:00:00' 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerScavenging/4-DnsServerScavenging_DisableScavenging_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 6b985cf2-8c93-47d7-9b90-31b28ec5147d 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will disable scavenging on the DNS server. 39 | #> 40 | 41 | Configuration DnsServerScavenging_DisableScavenging_Config 42 | { 43 | Import-DscResource -ModuleName 'DnsServerDsc' 44 | 45 | Node localhost 46 | { 47 | DnsServerScavenging 'DisableScavenging' 48 | { 49 | DnsServer = 'localhost' 50 | ScavengingState = $false 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerSecondaryZone/1-DnsServerSecondaryZone_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 580a9ebd-095b-48cb-ba02-d15094b4938d 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will manage a secondary standalone DNS zone 40 | #> 41 | 42 | Configuration DnsServerSecondaryZone_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerSecondaryZone 'sec' 49 | { 50 | Ensure = 'Present' 51 | Name = 'demo.contoso.com' 52 | MasterServers = '192.168.10.2' 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerSettingLegacy/1-DnsServerSettingLegacy_CurrentNode_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID a1a5300b-92c9-4443-8016-c305c6fbbfbb 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will manage the DNS server legacy settings on the current 40 | node. 41 | #> 42 | 43 | Configuration DnsServerSettingLegacy_CurrentNode_Config 44 | { 45 | Import-DscResource -ModuleName 'DnsServerDsc' 46 | 47 | Node localhost 48 | { 49 | DnsServerSettingLegacy 'DnsServerLegacyProperties' 50 | { 51 | DnsServer = 'localhost' 52 | DisjointNets = $false 53 | NoForwarderRecursion = $true 54 | LogLevel = 50393905 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerSettingLegacy/2-DnsServerSettingLegacy_RemoteNode_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID affae535-1236-474e-a5c7-ada598ebcf71 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will manage the DNS server legacy settings on the current 40 | node. 41 | #> 42 | 43 | Configuration DnsServerSettingLegacy_RemoteNode_Config 44 | { 45 | Import-DscResource -ModuleName 'DnsServerDsc' 46 | 47 | Node localhost 48 | { 49 | DnsServerSettingLegacy 'DnsServerLegacyProperties' 50 | { 51 | DnsServer = 'dns1.company.local' 52 | DisjointNets = $false 53 | NoForwarderRecursion = $true 54 | LogLevel = 50393905 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerZoneAging/1-DnsServerZoneAging_forward_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 54006187-ab7b-4071-ab51-df864cd6f834 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will manage aging of a DNS forward zone 40 | #> 41 | 42 | Configuration DnsServerZoneAging_forward_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerZoneAging 'DnsServerZoneAging' 49 | { 50 | Name = 'contoso.com' 51 | Enabled = $true 52 | RefreshInterval = 120 # 5 days 53 | NoRefreshInterval = 240 # 10 days 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerZoneAging/2-DnsServerZoneAging_reverse_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 3c496dfc-346b-49bc-b251-459b2704638c 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will manage aging of a DNS reverse zone 40 | #> 41 | 42 | Configuration DnsServerZoneAging_reverse_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | Node localhost 47 | { 48 | DnsServerZoneAging 'DnsServerReverseZoneAging' 49 | { 50 | Name = '168.192.in-addr-arpa' 51 | Enabled = $true 52 | RefreshInterval = 168 # 7 days 53 | NoRefreshInterval = 168 # 7 days 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerZoneScope/1-DnsServerZoneScope_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID f4aceafc-6d40-4e4f-94bc-d3b0e1e1bcac 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will manage a DNS zone scope 40 | #> 41 | 42 | Configuration DnsServerZoneScope_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | DnsServerZoneScope 'ZoneScope1' 47 | { 48 | Name = 'contoso_NorthAmerica' 49 | ZoneName = 'contoso.com' 50 | Ensure = 'Present' 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /source/Examples/Resources/DnsServerZoneTransfer/1-DnsServerZoneTransfer_config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.1 4 | 5 | .GUID 4345433b-17e1-4c0f-a59e-8a1f03947dea 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | Updated author, copyright notice, and URLs. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | 37 | <# 38 | .DESCRIPTION 39 | This configuration will manage a DNS zone transfer 40 | #> 41 | 42 | Configuration DnsServerZoneTransfer_config 43 | { 44 | Import-DscResource -ModuleName 'DnsServerDsc' 45 | 46 | DnsServerZoneTransfer 'TransferToAnyServer' 47 | { 48 | Name = 'demo.contoso.com' 49 | Type = 'Any' 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /source/Examples/Resources/DsnRecordRecursion/1-DnsServerRecursion_SetRecursionSettings_Config.ps1: -------------------------------------------------------------------------------- 1 | <#PSScriptInfo 2 | 3 | .VERSION 1.0.0 4 | 5 | .GUID 82d3c621-1cd2-4989-b234-ba0e38630639 6 | 7 | .AUTHOR DSC Community 8 | 9 | .COMPANYNAME DSC Community 10 | 11 | .COPYRIGHT DSC Community contributors. All rights reserved. 12 | 13 | .TAGS DSCConfiguration 14 | 15 | .LICENSEURI https://github.com/dsccommunity/DnsServerDsc/blob/main/LICENSE 16 | 17 | .PROJECTURI https://github.com/dsccommunity/DnsServerDsc 18 | 19 | .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png 20 | 21 | .EXTERNALMODULEDEPENDENCIES 22 | 23 | .REQUIREDSCRIPTS 24 | 25 | .EXTERNALSCRIPTDEPENDENCIES 26 | 27 | .RELEASENOTES 28 | First version. 29 | 30 | .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core 31 | 32 | #> 33 | 34 | #Requires -Module DnsServerDsc 35 | 36 | <# 37 | .DESCRIPTION 38 | This configuration will change the cache settings on the DNS server. 39 | #> 40 | 41 | Configuration DnsServerRecursion_SetRecursionSettings_Config 42 | { 43 | Import-DscResource -ModuleName 'DnsServerDsc' 44 | 45 | Node localhost 46 | { 47 | DnsServerRecursion 'SetRecursionSettings' 48 | { 49 | DnsServer = 'localhost' 50 | Enable = $true 51 | AdditionalTimeout = 4 52 | RetryInterval = 3 53 | Timeout = 8 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/Modules/DnsServerDsc.Common/DnsServerDsc.Common.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | # Script module or binary module file associated with this manifest. 3 | RootModule = 'DnsServerDsc.Common.psm1' 4 | 5 | # Version number of this module. 6 | ModuleVersion = '1.0.0' 7 | 8 | # ID used to uniquely identify this module 9 | GUID = 'df2cccf3-f8bd-4142-9539-ed5486caebe1' 10 | 11 | # Author of this module 12 | Author = 'DSC Community' 13 | 14 | # Company or vendor of this module 15 | CompanyName = 'DSC Community' 16 | 17 | # Copyright statement for this module 18 | Copyright = 'Copyright the DSC Community contributors. All rights reserved.' 19 | 20 | # Description of the functionality provided by this module 21 | Description = 'Functions used by the DSC resources in DnsServerDsc.' 22 | 23 | # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. 24 | FunctionsToExport = @( 25 | 'ConvertTo-FollowRfc1034' 26 | 'Convert-RootHintsToHashtable' 27 | ) 28 | 29 | # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. 30 | CmdletsToExport = @() 31 | 32 | # Variables to export from this module 33 | VariablesToExport = @() 34 | 35 | # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. 36 | AliasesToExport = @() 37 | 38 | # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. 39 | PrivateData = @{ 40 | PSData = @{ 41 | } # End of PSData hashtable 42 | } # End of PrivateData hashtable 43 | } 44 | -------------------------------------------------------------------------------- /source/Modules/DnsServerDsc.Common/en-US/DnsServerDsc.Common.strings.psd1: -------------------------------------------------------------------------------- 1 | ConvertFrom-StringData @' 2 | '@ 3 | -------------------------------------------------------------------------------- /source/Private/Assert-TimeSpan.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Assert that the value provided can be converted to a TimeSpan object. 4 | 5 | .PARAMETER Value 6 | The time value as a string that should be converted. 7 | #> 8 | function Assert-TimeSpan 9 | { 10 | [CmdletBinding()] 11 | param 12 | ( 13 | [Parameter(Mandatory = $true, ValueFromPipeline = $true)] 14 | [System.String] 15 | $Value, 16 | 17 | [Parameter(Mandatory = $true)] 18 | [System.String] 19 | $PropertyName, 20 | 21 | [Parameter()] 22 | [System.TimeSpan] 23 | $Maximum, 24 | 25 | [Parameter()] 26 | [System.TimeSpan] 27 | $Minimum 28 | ) 29 | 30 | $timeSpanObject = $Value | ConvertTo-TimeSpan 31 | 32 | # If the conversion fails $null is returned. 33 | if ($null -eq $timeSpanObject) 34 | { 35 | $errorMessage = $script:localizedData.PropertyHasWrongFormat -f $PropertyName, $Value 36 | 37 | New-InvalidOperationException -Message $errorMessage 38 | } 39 | 40 | if ($PSBoundParameters.ContainsKey('Maximum') -and $timeSpanObject -gt $Maximum) 41 | { 42 | $errorMessage = $script:localizedData.TimeSpanExceedMaximumValue -f $PropertyName, $timeSpanObject.ToString(), $Maximum 43 | 44 | New-InvalidOperationException -Message $errorMessage 45 | } 46 | 47 | if ($PSBoundParameters.ContainsKey('Minimum') -and $timeSpanObject -lt $Minimum) 48 | { 49 | $errorMessage = $script:localizedData.TimeSpanBelowMinimumValue -f $PropertyName, $timeSpanObject.ToString(), $Minimum 50 | 51 | New-InvalidOperationException -Message $errorMessage 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /source/Private/ConvertTo-TimeSpan.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Converts a string value to a TimeSpan object. 4 | 5 | .PARAMETER Value 6 | The time value as a string that should be converted. 7 | 8 | .OUTPUTS 9 | Returns an TimeSpan object containing the converted value, or $null if 10 | conversion was not possible. 11 | #> 12 | function ConvertTo-TimeSpan 13 | { 14 | [CmdletBinding()] 15 | [OutputType([System.TimeSpan])] 16 | param 17 | ( 18 | [Parameter(Mandatory = $true, ValueFromPipeline = $true)] 19 | [System.String] 20 | $Value 21 | ) 22 | 23 | $timeSpan = New-TimeSpan 24 | 25 | if (-not [System.TimeSpan]::TryParse($Value, [ref] $timeSpan)) 26 | { 27 | $timeSpan = $null 28 | } 29 | 30 | return $timeSpan 31 | } 32 | -------------------------------------------------------------------------------- /source/build.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | Path = 'DnsServerDsc.psd1' #or build breaks on Linux 3 | } 4 | # Waiting for ModuleBuilder to do away with this file 5 | # when all parameters are provided to the function 6 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordA.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsRecordA. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDnsRecordMessage = Getting specified DNS {0} record in zone '{1}' from '{3}'. 9 | CreatingDnsRecordMessage = Creating {0} record specified in zone '{1}' on '{3}'. 10 | '@ 11 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordAScoped.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsRecordAScoped. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDnsRecordMessage = Getting specified DNS {0} record in zone '{1}' with the '{2}' scope, from '{3}'. 9 | CreatingDnsRecordMessage = Creating {0} record specified in zone '{1}' with the '{2}' scope on '{3}'. 10 | '@ 11 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordAaaa.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsRecordAaaa. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDnsRecordMessage = Getting specified DNS {0} record in zone '{1}' from '{3}'. 9 | CreatingDnsRecordMessage = Creating {0} record specified in zone '{1}' on '{3}'. 10 | '@ 11 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordAaaaScoped.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsRecordAaaaScoped. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDnsRecordMessage = Getting specified DNS {0} record in zone '{1}' with the '{2}' scope, from '{3}'. 9 | CreatingDnsRecordMessage = Creating {0} record specified in zone '{1}' with the '{2}' scope on '{3}'. 10 | '@ 11 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordBase.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | class DnsRecordBase. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDscResourceObject = Calling GetResourceRecord() from the {0} class to get the object's current state. 9 | RecordNotFound = A matching DNS resource record not found. 10 | RecordFound = A matching DNS resource record was found. 11 | ModifyingExistingRecord = Modifying existing record. 12 | RemovingExistingRecord = Removing existing record. 13 | AddingNewRecord = Calling AddResourceRecord() from the {0} class to create a new record. 14 | PropertyIsNotInDesiredState = DNS record property '{0}' is not correct. Expected '{1}', actual '{2}'. 15 | ObjectInDesiredState = DNS record is in the desired state. 16 | ObjectNotInDesiredState = DNS record is NOT in the desired state. 17 | GetResourceRecordNotImplemented = GetResourceRecord() not implemented. 18 | AddResourceRecordNotImplemented = AddResourceRecord() not implemented. 19 | NewResourceObjectFromRecordNotImplemented = NewDscResourceObjectFromRecord() not implemented. 20 | '@ 21 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordCname.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsRecordCname. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDnsRecordMessage = Getting specified DNS {0} record in zone '{1}' from '{3}'. 9 | CreatingDnsRecordMessage = Creating {0} record specified in zone '{1}' on '{3}'. 10 | '@ 11 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordCnameScoped.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsRecordCnameScoped. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDnsRecordMessage = Getting specified DNS {0} record in zone '{1}' with the '{2}' scope, from '{3}'. 9 | CreatingDnsRecordMessage = Creating {0} record specified in zone '{1}' with the '{2}' scope on '{3}'. 10 | '@ 11 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordMx.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsRecordMx. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDnsRecordMessage = Getting specified DNS {0} record in zone '{1}' from '{3}'. 9 | CreatingDnsRecordMessage = Creating {0} record specified in zone '{1}' on '{3}'. 10 | DomainZoneMismatch = Email domain '{0}' must be the same as the zone specified ('{1}') or a subdomain thereof. 11 | '@ 12 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordMxScoped.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsRecordMxScoped. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDnsRecordMessage = Getting specified DNS {0} record in zone '{1}' with the '{2}' scope, from '{3}'. 9 | CreatingDnsRecordMessage = Creating {0} record specified in zone '{1}' with the '{2}' scope on '{3}'. 10 | '@ 11 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordNs.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsRecordNs. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDnsRecordMessage = Getting specified DNS {0} record in zone '{1}' from '{3}'. 9 | CreatingDnsRecordMessage = Creating {0} record specified in zone '{1}' on '{3}'. 10 | DomainZoneMismatch = Domain '{0}' must be the same as the zone specified ('{1}') or a subdomain thereof. 11 | '@ 12 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordNsScoped.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsRecordNsScoped. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDnsRecordMessage = Getting specified DNS {0} record in zone '{1}' with the '{2}' scope, from '{3}'. 9 | CreatingDnsRecordMessage = Creating {0} record specified in zone '{1}' with the '{2}' scope on '{3}'. 10 | '@ 11 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordPtr.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsRecordPtr. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDnsRecordMessage = Getting specified DNS {0} record in zone '{1}' from '{3}'. 9 | CreatingDnsRecordMessage = Creating {0} record specified in zone '{1}' on '{3}'. 10 | NotAnIPv4Zone = The zone "{0}" is not an IPv4 reverse lookup zone. 11 | NotAnIPv6Zone = The zone "{0}" is not an IPv6 reverse lookup zone. 12 | WrongZone = "{0}" does not belong to the "{1}" zone. 13 | '@ 14 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordSrv.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsRecordSrvScoped. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDnsRecordMessage = Getting DNS record '{0}' with target of '{1}' ({2}) in zone '{3}' from '{5}'. 9 | CreatingDnsRecordMessage = Creating {0} record for symbolic name '{1}' with target '{2}' in zone '{3}' on '{5}'. 10 | '@ 11 | -------------------------------------------------------------------------------- /source/en-US/DnsRecordSrvScoped.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsRecordSrvScoped. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GettingDnsRecordMessage = Getting DNS record '{0}' with target of '{1}' ({2}) in zone '{3}' with the '{4}' scope, from '{5}'. 9 | CreatingDnsRecordMessage = Creating {0} record for symbolic name '{1}' with target '{2}' in zone '{3}' with the '{4}' scope on '{5}'. 10 | 11 | '@ 12 | -------------------------------------------------------------------------------- /source/en-US/DnsServerCache.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsServerCache. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GetCurrentState = Getting the current state of the cache settings for the server '{0}'. (DSC0001) 9 | TestDesiredState = Determining the current state of the cache settings for the server '{0}'. (DSC0002) 10 | SetDesiredState = Setting the desired state for the cache settings for the server '{0}'. (DSC0003) 11 | NotInDesiredState = The cache settings for the server '{0}' is not in desired state. (DSC0004) 12 | InDesiredState = The cache settings for the server '{0}' is in desired state. (DSC0005) 13 | SetProperty = The cache property '{0}' will be set to '{1}'. (DSC0006) 14 | '@ 15 | -------------------------------------------------------------------------------- /source/en-US/DnsServerDsSetting.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsServerDsSetting. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GetCurrentState = Getting the current state of the directory services settings for the server '{0}'. (DSDS0001) 9 | TestDesiredState = Determining the current state of the directory services settings for the server '{0}'. (DSDS0002) 10 | SetDesiredState = Setting the desired state for the directory services settings for the server '{0}'. (DSDS0003) 11 | NotInDesiredState = The directory services settings for the server '{0}' is not in desired state. (DSDS0004) 12 | InDesiredState = The directory services settings for the server '{0}' is in desired state. (DSDS0005) 13 | SetProperty = The directory services property '{0}' will be set to '{1}'. (DSDS0006) 14 | '@ 15 | -------------------------------------------------------------------------------- /source/en-US/DnsServerDsc.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsServerDsc module. This file should only contain 5 | localized strings for private and public functions. 6 | #> 7 | 8 | ConvertFrom-StringData @' 9 | PropertyHasWrongFormat = The property '{0}' has the value '{1}' that cannot be converted to 'System.TimeSpan'. (DS0001) 10 | TimeSpanExceedMaximumValue = The property '{0}' has the value '{1}' that exceeds the maximum value of '{2}'. (DS0002) 11 | TimeSpanBelowMinimumValue = The property '{0}' has the value '{1}' that is below the minimum value of '{2}'. (DS0003) 12 | '@ 13 | -------------------------------------------------------------------------------- /source/en-US/DnsServerEDns.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsServerEDns. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GetCurrentState = Getting the current state of the extension mechanisms for DNS (EDNS) settings for the server '{0}'. (DSED0001) 9 | TestDesiredState = Determining the current state of the extension mechanisms for DNS (EDNS) settings for the server '{0}'. (DSED0002) 10 | SetDesiredState = Setting the desired state for the extension mechanisms for DNS (EDNS) settings for the server '{0}'. (DSED0003) 11 | NotInDesiredState = The extension mechanisms for DNS (EDNS) settings for the server '{0}' is not in desired state. (DSED0004) 12 | InDesiredState = The extension mechanisms for DNS (EDNS) settings for the server '{0}' is in desired state. (DSED0005) 13 | SetProperty = The extension mechanisms for DNS (EDNS) property '{0}' will be set to '{1}'. (DSED0006) 14 | '@ 15 | -------------------------------------------------------------------------------- /source/en-US/DnsServerRecursion.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsServerRecursion. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GetCurrentState = Getting the current state of the recursion settings for the server '{0}'. (DSR0001) 9 | TestDesiredState = Determining the current state of the recursion settings for the server '{0}'. (DSR0002) 10 | SetDesiredState = Setting the desired state for the recursion settings for the server '{0}'. (DSR0003) 11 | NotInDesiredState = The recursion settings for the server '{0}' is not in desired state. (DSR0004) 12 | InDesiredState = The recursion settings for the server '{0}' is in desired state. (DSR0005) 13 | SetProperty = The recursion property '{0}' will be set to '{1}'. (DSR0006) 14 | PropertyIsNotInValidRange = The property '{0}' has the value '{1}' that is not within the range of 1 seconds to 15 seconds. (DSR0007) 15 | '@ 16 | -------------------------------------------------------------------------------- /source/en-US/DnsServerScavenging.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | resource DnsServerScavenging. 5 | #> 6 | 7 | ConvertFrom-StringData @' 8 | GetCurrentState = Getting the current state of the scavenging settings for the server '{0}'. (DSS0001) 9 | TestDesiredState = Determining the current state of the scavenging settings for the server '{0}'. (DSS0002) 10 | SetDesiredState = Setting the desired state for the scavenging settings for the server '{0}'. (DSS0003) 11 | NotInDesiredState = The scavenging settings for the server '{0}' is not in desired state. (DSS0004) 12 | InDesiredState = The scavenging settings for the server '{0}' is in desired state. (DSS0005) 13 | SetProperty = The scavenging property '{0}' will be set to '{1}'. (DSS0006) 14 | '@ 15 | -------------------------------------------------------------------------------- /source/en-US/ResourcePropertiesBase.strings.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | The localized resource strings in English (en-US) for the 4 | class ResourcePropertiesBase. 5 | 6 | .NOTES 7 | This should normally not have any strings since the base class is only meant 8 | to have DSC properties that can be inherited. Though this localized string 9 | file exist so that it possible to recursively look for strings in all inherited 10 | classes (base classes). 11 | #> 12 | 13 | ConvertFrom-StringData @' 14 | '@ 15 | -------------------------------------------------------------------------------- /source/en-US/about_DnsServerDsc.help.txt: -------------------------------------------------------------------------------- 1 | TOPIC 2 | about_DnsServerDsc 3 | 4 | SHORT DESCRIPTION 5 | DSC resources for the management and configuration of Windows Server DNS Server. 6 | 7 | LONG DESCRIPTION 8 | This module contains DSC resources for the management and configuration of Windows Server DNS Server. 9 | 10 | EXAMPLES 11 | PS C:\> Get-DscResource -Module DnsServerDsc 12 | 13 | NOTE: 14 | Thank you to the DSC Community contributors who contributed to this module by 15 | writing code, sharing opinions, and provided feedback. 16 | 17 | TROUBLESHOOTING NOTE: 18 | Go to the Github repository for read about issues, submit a new issue, and read 19 | about new releases. https://github.com/dsccommunity/DnsServerDsc 20 | 21 | SEE ALSO 22 | - https://github.com/dsccommunity/DnsServerDsc 23 | 24 | KEYWORDS 25 | DSC, DscResource, DNS 26 | -------------------------------------------------------------------------------- /source/prefix.ps1: -------------------------------------------------------------------------------- 1 | using module .\Modules\DscResource.Base 2 | 3 | # Import nested, 'DscResource.Common' module 4 | $script:dscResourceCommonModulePath = Join-Path -Path $PSScriptRoot -ChildPath 'Modules\DscResource.Common' 5 | Import-Module -Name $script:dscResourceCommonModulePath 6 | 7 | # TODO: The goal would be to remove this, when no classes and public or private functions need it. 8 | $script:dnsServerDscCommonModulePath = Join-Path -Path $PSScriptRoot -ChildPath 'Modules\DnsServerDsc.Common' 9 | Import-Module -Name $script:dnsServerDscCommonModulePath 10 | 11 | $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US' 12 | -------------------------------------------------------------------------------- /tests/Integration/Classes/DnsServerEDns.config.ps1: -------------------------------------------------------------------------------- 1 | $ConfigurationData = @{ 2 | AllNodes = @( 3 | @{ 4 | NodeName = 'localhost' 5 | CertificateFile = $env:DscPublicCertificatePath 6 | } 7 | ) 8 | } 9 | 10 | <# 11 | .SYNOPSIS 12 | Disables probes. 13 | #> 14 | configuration DnsServerEDns_DisableProbes_Config 15 | { 16 | Import-DscResource -ModuleName 'DnsServerDsc' 17 | 18 | node $AllNodes.NodeName 19 | { 20 | DnsServerEDns 'Integration_Test' 21 | { 22 | DnsServer = 'localhost' 23 | EnableProbes = $false 24 | } 25 | } 26 | } 27 | 28 | <# 29 | .SYNOPSIS 30 | Enabled probes. 31 | #> 32 | configuration DnsServerEDns_EnableProbes_Config 33 | { 34 | Import-DscResource -ModuleName 'DnsServerDsc' 35 | 36 | node $AllNodes.NodeName 37 | { 38 | DnsServerEDns 'Integration_Test' 39 | { 40 | DnsServer = 'localhost' 41 | EnableProbes = $true 42 | } 43 | } 44 | } 45 | 46 | <# 47 | .SYNOPSIS 48 | Disables reception. 49 | #> 50 | configuration DnsServerEDns_DisableReception_Config 51 | { 52 | Import-DscResource -ModuleName 'DnsServerDsc' 53 | 54 | node $AllNodes.NodeName 55 | { 56 | DnsServerEDns 'Integration_Test' 57 | { 58 | DnsServer = 'localhost' 59 | EnableReception = $false 60 | } 61 | } 62 | } 63 | 64 | <# 65 | .SYNOPSIS 66 | Enabled reception. 67 | #> 68 | configuration DnsServerEDns_EnableReception_Config 69 | { 70 | Import-DscResource -ModuleName 'DnsServerDsc' 71 | 72 | node $AllNodes.NodeName 73 | { 74 | DnsServerEDns 'Integration_Test' 75 | { 76 | DnsServer = 'localhost' 77 | EnableReception = $true 78 | } 79 | } 80 | } 81 | 82 | <# 83 | .SYNOPSIS 84 | Set cache timeout. 85 | #> 86 | configuration DnsServerEDns_SetCacheTimeout_Config 87 | { 88 | Import-DscResource -ModuleName 'DnsServerDsc' 89 | 90 | node $AllNodes.NodeName 91 | { 92 | DnsServerEDns 'Integration_Test' 93 | { 94 | DnsServer = 'localhost' 95 | CacheTimeout = '00:30:00' 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /tests/Integration/Classes/DnsServerScavenging.config.ps1: -------------------------------------------------------------------------------- 1 | $ConfigurationData = @{ 2 | AllNodes = @( 3 | @{ 4 | NodeName = 'localhost' 5 | CertificateFile = $env:DscPublicCertificatePath 6 | } 7 | ) 8 | } 9 | 10 | <# 11 | .SYNOPSIS 12 | Enables scavenging. 13 | #> 14 | configuration DnsServerScavenging_EnableScavenging_Config 15 | { 16 | Import-DscResource -ModuleName 'DnsServerDsc' 17 | 18 | node $AllNodes.NodeName 19 | { 20 | DnsServerScavenging 'Integration_Test' 21 | { 22 | DnsServer = 'localhost' 23 | ScavengingState = $true 24 | } 25 | } 26 | } 27 | 28 | <# 29 | .SYNOPSIS 30 | Sets all intervals. 31 | #> 32 | configuration DnsServerScavenging_SetAllIntervals_Config 33 | { 34 | Import-DscResource -ModuleName 'DnsServerDsc' 35 | 36 | node $AllNodes.NodeName 37 | { 38 | DnsServerScavenging 'Integration_Test' 39 | { 40 | DnsServer = 'localhost' 41 | ScavengingInterval = '30.00:00:00' 42 | RefreshInterval = '30.00:00:00' 43 | NoRefreshInterval = '30.00:00:00' 44 | } 45 | } 46 | } 47 | 48 | <# 49 | .SYNOPSIS 50 | Sets one interval. 51 | #> 52 | configuration DnsServerScavenging_SetOneInterval_Config 53 | { 54 | Import-DscResource -ModuleName 'DnsServerDsc' 55 | 56 | node $AllNodes.NodeName 57 | { 58 | DnsServerScavenging 'Integration_Test' 59 | { 60 | DnsServer = 'localhost' 61 | ScavengingInterval = '6.23:00:00' 62 | } 63 | } 64 | } 65 | 66 | <# 67 | .SYNOPSIS 68 | Disables scavenging. 69 | #> 70 | configuration DnsServerScavenging_DisableScavenging_Config 71 | { 72 | Import-DscResource -ModuleName 'DnsServerDsc' 73 | 74 | node $AllNodes.NodeName 75 | { 76 | DnsServerScavenging 'Integration_Test' 77 | { 78 | DnsServer = 'localhost' 79 | ScavengingState = $false 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /tests/Integration/DSC_DnsServerRootHint.config.ps1: -------------------------------------------------------------------------------- 1 | $ConfigurationData = @{ 2 | AllNodes = @( 3 | @{ 4 | NodeName = 'localhost' 5 | CertificateFile = $env:DscPublicCertificatePath 6 | 7 | NameServer = @{ 8 | 'H.ROOT-SERVERS.NET.' = '198.97.190.53' 9 | 'E.ROOT-SERVERS.NET.' = '192.203.230.10' 10 | 'M.ROOT-SERVERS.NET.' = '202.12.27.33' 11 | 'A.ROOT-SERVERS.NET.' = '198.41.0.4' 12 | 'D.ROOT-SERVERS.NET.' = '199.7.91.13' 13 | 'F.ROOT-SERVERS.NET.' = '192.5.5.241' 14 | 'B.ROOT-SERVERS.NET.' = '192.228.79.201' 15 | 'G.ROOT-SERVERS.NET.' = '192.112.36.4' 16 | 'C.ROOT-SERVERS.NET.' = '192.33.4.12' 17 | 'K.ROOT-SERVERS.NET.' = '193.0.14.129' 18 | 'I.ROOT-SERVERS.NET.' = '192.36.148.17' 19 | 'J.ROOT-SERVERS.NET.' = '192.58.128.30' 20 | 'L.ROOT-SERVERS.NET.' = '199.7.83.42' 21 | } 22 | } 23 | ) 24 | } 25 | 26 | configuration DSC_DnsServerRootHint_RemoveAllRootHints_Config 27 | { 28 | Import-DscResource -ModuleName 'DnsServerDsc' 29 | 30 | node $AllNodes.NodeName 31 | { 32 | DnsServerRootHint 'Integration_Test' 33 | { 34 | IsSingleInstance = 'Yes' 35 | NameServer = @{} 36 | } 37 | } 38 | } 39 | 40 | configuration DSC_DnsServerRootHint_SetRootHints_Config 41 | { 42 | Import-DscResource -ModuleName 'DnsServerDsc' 43 | 44 | node $AllNodes.NodeName 45 | { 46 | DnsServerRootHint 'Integration_Test' 47 | { 48 | IsSingleInstance = 'Yes' 49 | NameServer = $Node.NameServer 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /tests/Integration/DSC_DnsServerSettingLegacy.config.ps1: -------------------------------------------------------------------------------- 1 | $ConfigurationData = @{ 2 | AllNodes = @( 3 | @{ 4 | NodeName = 'localhost' 5 | CertificateFile = $env:DscPublicCertificatePath 6 | DnsServer = 'localhost' 7 | DisjointNets = $false 8 | NoForwarderRecursion = $false 9 | LogLevel = 2197877553 10 | } 11 | ) 12 | } 13 | 14 | Configuration DSC_DnsServerSettingLegacy_SetSettings_Config 15 | { 16 | Import-DscResource -ModuleName 'DnsServerDsc' 17 | 18 | node $AllNodes.NodeName 19 | { 20 | DnsServerSettingLegacy 'Integration_Test' 21 | { 22 | 23 | DnsServer = $Node.DnsServer 24 | DisjointNets = $Node.DisjointNets 25 | NoForwarderRecursion = $Node.NoForwarderRecursion 26 | LogLevel = $Node.LogLevel 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/Integration/DSC_DnsServerZoneScope.config.ps1: -------------------------------------------------------------------------------- 1 | $ConfigurationData = @{ 2 | AllNodes = @( 3 | @{ 4 | NodeName = 'localhost' 5 | CertificateFile = $env:DscPublicCertificatePath 6 | 7 | ForwardZoneName = 'dsc.test' 8 | ZoneScopeName = 'dsc_Europe' 9 | } 10 | ) 11 | } 12 | 13 | configuration DSC_DnsServerZoneScope_Prerequisites_Config 14 | { 15 | Import-DscResource -ModuleName 'DnsServerDsc' 16 | 17 | node $AllNodes.NodeName 18 | { 19 | DnsServerPrimaryZone 'ForwardZone' 20 | { 21 | Name = $Node.ForwardZoneName 22 | } 23 | } 24 | } 25 | 26 | configuration DSC_DnsServerZoneScope_AddZoneScope_Config 27 | { 28 | Import-DscResource -ModuleName 'DnsServerDsc' 29 | 30 | node $AllNodes.NodeName 31 | { 32 | DnsServerZoneScope 'Integration_Test' 33 | { 34 | Name = $Node.ZoneScopeName 35 | ZoneName = $Node.ForwardZoneName 36 | } 37 | } 38 | } 39 | 40 | configuration DSC_DnsServerZoneScope_RemoveZoneScope_Config 41 | { 42 | Import-DscResource -ModuleName 'DnsServerDsc' 43 | 44 | node $AllNodes.NodeName 45 | { 46 | DnsServerZoneScope 'Integration_Test' 47 | { 48 | Ensure = 'Absent' 49 | Name = $Node.ZoneScopeName 50 | ZoneName = $Node.ForwardZoneName 51 | } 52 | } 53 | } 54 | 55 | configuration DSC_DnsServerZoneScope_Cleanup_Config 56 | { 57 | Import-DscResource -ModuleName 'DnsServerDsc' 58 | 59 | node $AllNodes.NodeName 60 | { 61 | DnsServerPrimaryZone 'ForwardZone' 62 | { 63 | Ensure = 'Absent' 64 | Name = $Node.ForwardZoneName 65 | } 66 | } 67 | } 68 | --------------------------------------------------------------------------------