{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration/issues/376","repository_url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration","labels_url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration/issues/376/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration/issues/376/comments","events_url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration/issues/376/events","html_url":"https://github.com/PowerShell/xPSDesiredStateConfiguration/issues/376","id":277030146,"number":376,"title":"Example files and setting up HTTPS Real Certificate DSC Pull Server + Client - xPSDesiredStateConfiguration Module version 8.0.0.0","user":{"login":"MarioParty1","id":20814317,"avatar_url":"https://avatars2.githubusercontent.com/u/20814317?v=4","gravatar_id":"","url":"https://api.github.com/users/MarioParty1","html_url":"https://github.com/MarioParty1","followers_url":"https://api.github.com/users/MarioParty1/followers","following_url":"https://api.github.com/users/MarioParty1/following{/other_user}","gists_url":"https://api.github.com/users/MarioParty1/gists{/gist_id}","starred_url":"https://api.github.com/users/MarioParty1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarioParty1/subscriptions","organizations_url":"https://api.github.com/users/MarioParty1/orgs","repos_url":"https://api.github.com/users/MarioParty1/repos","events_url":"https://api.github.com/users/MarioParty1/events{/privacy}","received_events_url":"https://api.github.com/users/MarioParty1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2017-11-27T14:07:24Z","updated_at":"2018-02-19T17:52:00Z","closed_at":null,"author_association":"NONE","body":"I posted the following comment on:\r\nhttps://docs.microsoft.com/en-us/powershell/dsc/pullserver\r\n_________________________________________________________________________________________________\r\nHi,\r\n\r\nhttps://docs.microsoft.com/en-us/powershell/dsc/pullserver\r\nComment on point 4: configuration Sample_xDscPullServer\r\nThe Example configuration seems not up-2-date anymore and the example name file changed\r\n\r\nThe up-2-date example seems to be:\r\nhttps://github.com/PowerShell/xPSDesiredStateConfiguration/blob/dev/Examples/Sample_xDscWebServiceRegistration.ps1\r\nhttps://github.com/PowerShell/xPSDesiredStateConfiguration/blob/dev/Examples/Sample_xDscWebServiceRegistrationWithSecurityBestPractices.ps1\r\n\r\n\r\nI will post this on Github too. "},"comment":{"url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration/issues/comments/366764183","html_url":"https://github.com/PowerShell/xPSDesiredStateConfiguration/issues/376#issuecomment-366764183","issue_url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration/issues/376","id":366764183,"user":{"login":"MarioParty1","id":20814317,"avatar_url":"https://avatars2.githubusercontent.com/u/20814317?v=4","gravatar_id":"","url":"https://api.github.com/users/MarioParty1","html_url":"https://github.com/MarioParty1","followers_url":"https://api.github.com/users/MarioParty1/followers","following_url":"https://api.github.com/users/MarioParty1/following{/other_user}","gists_url":"https://api.github.com/users/MarioParty1/gists{/gist_id}","starred_url":"https://api.github.com/users/MarioParty1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarioParty1/subscriptions","organizations_url":"https://api.github.com/users/MarioParty1/orgs","repos_url":"https://api.github.com/users/MarioParty1/repos","events_url":"https://api.github.com/users/MarioParty1/events{/privacy}","received_events_url":"https://api.github.com/users/MarioParty1/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T17:52:00Z","updated_at":"2018-02-19T17:52:00Z","author_association":"NONE","body":"Based on all my comments my personal Guide and Configuration file looks in total as following:\r\n\r\n\r\n# ========================================= Author ============================================== #\r\n# Author  | Wesley Schrik\r\n# Contact | wesley@schrikict.nl\r\n# Date    | 19-02-2018\r\n# Version | 0.2\r\n\r\n\r\n# ========================================= Issues ============================================== #\r\n# Reported sample file issues based on the original file \"Sample_xDscWebServiceRegistrationWithEnhancedSecurity\" in Powershell module \"xPSDesiredStateConfiguration v8.0.0.0\" \r\n# https://github.com/PowerShell/xPSDesiredStateConfiguration/issues/376\r\n\r\n\r\n# ======================================= Description =========================================== #\r\n# DSC configuration for Pull Server using registration with enhanced security settings.\r\n# The \"Sample_xDscWebServiceRegistrationWithEnhancedSecurity\" configuration sets up a DSC pull server that is capable for client nodes.\r\n# To register with it and retrieve configuration documents with configuration names instead of configuration id.\r\n\r\n\r\n# ================================ Pre-requisites DSC Pull Server =============================== #\r\n# COMPONENT                                             | VERSION   | Folder / Command                                                              | URL\r\n# .NET Framework                                \t    | 4.5.2     |                                                                               | https://www.microsoft.com/en-us/download/details.aspx?id=42642  \r\n# WMF (Windows Management Framework)                    | 5.1       |                                                                               | https://docs.microsoft.com/en-us/powershell/wmf/5.1/install-configure           \r\n# Powershell Remoting                                   |           | enable-psremoting -force                                                      | https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/enable-psremoting?view=powershell-5.1            \r\n# PowerShell NuGet module (to download other modules)   | 1.3.3     | C:\\Program Files\\PackageManagement\\ProviderAssemblies\\nuget\\2.8.5.208         | https://github.com/PowerShellOrg/NuGet\r\n# PowerShell DSC Supported module                       | 8.0.0     | C:\\Program Files\\WindowsPowerShell\\Modules\\xPSDesiredStateConfiguration\\8.0.0 | https://github.com/PowerShell/xPSDesiredStateConfiguration                \r\n# PowerShell DSC High Quality module                    | 2.8.0.0   | C:\\Program Files\\WindowsPowerShell\\Modules\\PSDscResources\\2.8.0.0             | https://github.com/PowerShell/PSDscResources                \r\n\r\n\r\n# ========================= Pre-requisites DSC Pull Server Certificate ========================== #\r\n# Install a certificate in \"CERT:\\LocalMachine\\MY\\\" store.\r\n# For testing environments, you could use a self-signed certificate. (New-SelfSignedCertificate cmdlet could generate one for you).\r\n# For production environments, you will need a certificate signed by valid CA.\r\n# Registration only works over https protocols. So to use registration feature, a secure pull server setup with certificate is necessary.\r\n\r\n\r\n# ======================================== Installation ========================================= #\r\n# This scripts only generates a <$NodeName>.MOF file.\r\n# Checksum on the .MOF file is currently not used.\r\n\r\n# The following parameters are customer specific, not clear why the following example is given to execute the script. These lines affect the Arguments Section:\r\n# <Scriptfilename.ps1> -RegistrationKey $RegistrationKey -CertificateThumbPrint $CertificateThumbPrint\r\n\r\n# With the .MOF file you can apply the DSC Pull Server configuration with the Start-DscConfiguration command here below.\r\n# Run the command twice. The code block \"File RegistrationKeyFile\" is a DSC chicken and egg story. \r\n# The first run it does not exist/succes for some reason. The second run it will be created and succeed.\r\n\r\n# Start-DscConfiguration -Path <Filename not needed, checks for .MOF file with ComputerName> -ComputerName <$NodeName target server in this script> -force -verbose -wait\r\n# Start-DscConfiguration -Path C:\\Temp -ComputerName WTST0055 -force -verbose -wait\r\n\r\n\r\n# ======================================== Arguments ============================================ #\r\n  $CertificateThumbPrint = (New-SelfSignedCertificate -Subject \"BLABLANAME\").Thumbprint\r\n  $RegistrationKey       = [guid]::NewGuid()\r\n\r\n# $CertificateThumbPrint = Example 2b6e5914d236d594ddce355d7a6779b563932c34 # Creates new Certificate + Thumbprint each run and add parameter value to new .MOF file.\r\n# $RegistrationKey       = Example 201dd1e3-53d6-4265-9992-6647c2ab2152     # Generates new RegistrationKey each run and parameter value to new .MOF file.\r\n\r\n\r\n# ================================== Section DSC Pull Server ==================================== #\r\nconfiguration \r\nBLABLAMYNAME\r\n{\r\n    param \r\n    (\r\n        [string[]]$NodeName = 'BLABLAHOSTNAME', \r\n\r\n        [ValidateNotNullOrEmpty()]\r\n        [string] $CertificateThumbPrint,\r\n\r\n        [Parameter(HelpMessage='This should be a string with enough entropy (randomness) to protect the registration of clients to the pull server.  We will use new GUID by default.')]\r\n        [ValidateNotNullOrEmpty()]\r\n        [string] $RegistrationKey # A guid that clients use to initiate conversation with pull server\r\n    )\r\n    \r\n    Import-DSCResource -ModuleName xPSDesiredStateConfiguration\r\n    Import-DSCResource -ModuleName PSDesiredStateConfiguration\r\n\r\n    Node $NodeName\r\n    {\r\n        WindowsFeature DSCServiceFeature\r\n        {\r\n            Ensure = \"Present\"\r\n            Name   = \"DSC-Service\"            \r\n        }\r\n\r\n        xDscWebService PSDSCPullServer\r\n        # Installs WindowsFeature \"DSCServiceFeature\" which includes the IIS Web Server Role (without Management Tools)\r\n        {\r\n            Ensure                       = \"Present\"\r\n            EndpointName                 = \"BLABLANAME\" # Name that is used for the IIS Website + \"Issued To\" and \"Issued By\" for a self signed certificate.\r\n            Port                         = 443\r\n            CertificateThumbPrint        = $CertificateThumbPrint \r\n            PhysicalPath                 = \"$env:SystemDrive\\inetpub\\ITN_PSDSCPullServer\"        \r\n            ModulePath                   = \"$env:PROGRAMFILES\\WindowsPowerShell\\DscService\\Modules\"\r\n            ConfigurationPath            = \"$env:PROGRAMFILES\\WindowsPowerShell\\DscService\\Configuration\"            \r\n            RegistrationKeyPath          = \"$env:PROGRAMFILES\\WindowsPowerShell\\DscService\" \r\n            Enable32BitAppOnWin64        = $false  \r\n            UseSecurityBestPractices     = $false # Caution: Setting this property to $true will reset registry values under \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL\".\r\n            DisableSecurityBestPractices ='SecureTLSProtocols'\r\n            AcceptSelfSignedCertificates = $false\r\n            # AllowUnencryptedTraffic      = $false # Seems no valid parameter\r\n            State                        = \"Started\"\r\n            DependsOn                    = \"[WindowsFeature]DSCServiceFeature\" \r\n        }\r\n\r\n        File RegistrationKeyFile\r\n        {\r\n            Ensure          = \"Present\"\r\n            Type            = \"File\"\r\n            DestinationPath = \"$env:ProgramFiles\\WindowsPowerShell\\DscService\\RegistrationKeys.txt\"\r\n            Contents        = $RegistrationKey\r\n        }\r\n\r\n        # Enable IIS remote management\r\n        WindowsFeature Web-Mgmt-Service\r\n        {\r\n            Ensure    = \"Present\"\r\n            Name      = \"Web-Mgmt-Service\"\r\n            DependsOn = \"[WindowsFeature]DSCServiceFeature\"\r\n        }\r\n        \r\n        Registry EnableRemoteManagement # By default installing the WindowsFeature Web-Mgmt-Service does not set this registry value\r\n        {\r\n            Ensure      = \"Present\"\r\n            Key         = \"HKLM:\\SOFTWARE\\Microsoft\\WebManagement\\Server\"\r\n            Valuename   = \"EnableRemoteManagement\"\r\n            Valuetype   = \"Dword\"\r\n            Valuedata   = \"1\"\r\n            DependsOn   = \"[WindowsFeature]DSCServiceFeature\"\r\n        }\r\n\r\n        Service WMSVC # Remote Administration for IIS Manager\r\n        {\r\n            Ensure      = \"Present\"\r\n            Name        = \"WMSVC\"\r\n            StartupType = \"Automatic\" # Default state is manual\r\n            State       = \"Running\"\r\n            DependsOn   = \"[WindowsFeature]DSCServiceFeature\"\r\n        }\r\n    }\r\n}\r\n"}}
{"actor":{"display_login":"MarioParty1"}}