{"action":"created","comment":{"url":"https://api.github.com/repos/PowerShell/xWebAdministration/pulls/comments/46505244","id":46505244,"diff_hunk":"@@ -812,85 +819,44 @@ function Update-WebsiteBinding\n     }\n }\n \n-function Get-WebBindingObject\n-{\n-    param\n-    (\n-        $BindingInfo\n-    )\n-\n-    #First split properties by ']:'. This will get IPv6 address split from port and host name\n-    $Split = $BindingInfo.BindingInformation.split('[]')\n-    if($Split.count -gt 1)\n-    {\n-        $IPAddress = $Split.item(1)\n-        $Port = $Split.item(2).split(':').item(1)\n-        $HostName = $Split.item(2).split(':').item(2)\n-    }\n-    else\n-    {\n-        $SplitProps = $BindingInfo.BindingInformation.split(':')\n-        $IPAddress = $SplitProps.item(0)\n-        $Port = $SplitProps.item(1)\n-        $HostName = $SplitProps.item(2)\n-    }\n-\n-    return New-Object -TypeName PSObject -Property @{\n-        Protocol              = $BindingInfo.protocol\n-        IPAddress             = $IPAddress\n-        Port                  = $Port\n-        HostName              = $HostName\n-        CertificateThumbprint = $BindingInfo.CertificateHash\n-        CertificateStoreName  = $BindingInfo.CertificateStoreName\n-        sslFlags              = $BindingInfo.sslFlags\n-    }\n-}\n \n # Helper function used to Update default pages of website\n function Update-DefaultPages\n {\n     param\n-   (\n-        [string] $Name,\n+    (\n+        [Parameter(Mandatory = $true)]\n+        [String]\n+        $Name,\n \n-        [string[]] $DefaultPage\n+        [Parameter(Mandatory = $true)]\n+        [String[]]\n+        $DefaultPage\n     )\n \n-    $allDefaultPage = @(Get-WebConfiguration //defaultDocument/files/* -PSPath (Join-Path -Path 'IIS:\\sites\\' -ChildPath $Name) | ForEach-Object -Process {\n-        Write-Output -InputObject $_.value\n-    })\n+    $allDefaultPage = @(\n+        Get-WebConfiguration -Filter '//defaultDocument/files/*' -PSPath \"IIS:\\Sites\\$Name\" |\n+        ForEach-Object -Process {\n+            Write-Output -InputObject $_.value\n+        }\n+    )\n \n-    foreach($page in $DefaultPage)\n+    foreach ($Page in $DefaultPage)\n     {\n-        if(-not ($allDefaultPage -icontains $page))\n+        if ($allDefaultPage -inotcontains $Page)\n         {\n-            Write-Verbose -Message (\"Deafult page for website $Name has been updated to $page\")\n-            Add-WebConfiguration //defaultDocument/files -PSPath (Join-Path -Path 'IIS:\\sites\\' -ChildPath $Name) -Value @{\n-                value = $page\n+            Add-WebConfiguration -Filter '//defaultDocument/files' -PSPath \"IIS:\\Sites\\$Name\" -Value @{\n+                value = $Page\n+            }\n+\n+            if ($? -eq $true)\n+            {\n+                Write-Verbose -Message \"Default page for website $Name has been updated to $Page\"\n             }\n         }\n     }\n }\n \n-function Write-Log","path":"DSCResources/MSFT_xWebsite/MSFT_xWebsite.psm1","position":1094,"original_position":1065,"commit_id":"985ab36bde2e5fb390d596747fbfe34e1e586a8d","original_commit_id":"258b87581219e6020646144d633bcfb8b24cac9f","user":{"login":"tysonjhayes","id":651851,"avatar_url":"https://avatars.githubusercontent.com/u/651851?v=3","gravatar_id":"","url":"https://api.github.com/users/tysonjhayes","html_url":"https://github.com/tysonjhayes","followers_url":"https://api.github.com/users/tysonjhayes/followers","following_url":"https://api.github.com/users/tysonjhayes/following{/other_user}","gists_url":"https://api.github.com/users/tysonjhayes/gists{/gist_id}","starred_url":"https://api.github.com/users/tysonjhayes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tysonjhayes/subscriptions","organizations_url":"https://api.github.com/users/tysonjhayes/orgs","repos_url":"https://api.github.com/users/tysonjhayes/repos","events_url":"https://api.github.com/users/tysonjhayes/events{/privacy}","received_events_url":"https://api.github.com/users/tysonjhayes/received_events","type":"User","site_admin":false},"body":"Well I guess that's what git history is for so I should cut an issue to switch everything over to it and be done with it.","created_at":"2015-12-03T02:10:46Z","updated_at":"2015-12-03T02:10:46Z","html_url":"https://github.com/PowerShell/xWebAdministration/pull/65#discussion_r46505244","pull_request_url":"https://api.github.com/repos/PowerShell/xWebAdministration/pulls/65","_links":{"self":{"href":"https://api.github.com/repos/PowerShell/xWebAdministration/pulls/comments/46505244"},"html":{"href":"https://github.com/PowerShell/xWebAdministration/pull/65#discussion_r46505244"},"pull_request":{"href":"https://api.github.com/repos/PowerShell/xWebAdministration/pulls/65"}}},"pull_request":{"url":"https://api.github.com/repos/PowerShell/xWebAdministration/pulls/65","id":52306656,"html_url":"https://github.com/PowerShell/xWebAdministration/pull/65","diff_url":"https://github.com/PowerShell/xWebAdministration/pull/65.diff","patch_url":"https://github.com/PowerShell/xWebAdministration/pull/65.patch","issue_url":"https://api.github.com/repos/PowerShell/xWebAdministration/issues/65","number":65,"state":"open","locked":false,"title":"xWebsite - Fixed a bug in bindings comparison","user":{"login":"SNikalaichyk","id":13381926,"avatar_url":"https://avatars.githubusercontent.com/u/13381926?v=3","gravatar_id":"","url":"https://api.github.com/users/SNikalaichyk","html_url":"https://github.com/SNikalaichyk","followers_url":"https://api.github.com/users/SNikalaichyk/followers","following_url":"https://api.github.com/users/SNikalaichyk/following{/other_user}","gists_url":"https://api.github.com/users/SNikalaichyk/gists{/gist_id}","starred_url":"https://api.github.com/users/SNikalaichyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SNikalaichyk/subscriptions","organizations_url":"https://api.github.com/users/SNikalaichyk/orgs","repos_url":"https://api.github.com/users/SNikalaichyk/repos","events_url":"https://api.github.com/users/SNikalaichyk/events{/privacy}","received_events_url":"https://api.github.com/users/SNikalaichyk/received_events","type":"User","site_admin":false},"body":"1. The xWebsite module was updated to fix a bug in bindings comparison which caused bindings to be reassigned on every DSC consistency check.\r\n2. The code was refactored a little bit,\r\n3. Unit tests updated.","created_at":"2015-12-01T19:53:22Z","updated_at":"2015-12-03T02:10:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25d1d30ac1601f06f437aa0c470670cd96468528","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PowerShell/xWebAdministration/pulls/65/commits","review_comments_url":"https://api.github.com/repos/PowerShell/xWebAdministration/pulls/65/comments","review_comment_url":"https://api.github.com/repos/PowerShell/xWebAdministration/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PowerShell/xWebAdministration/issues/65/comments","statuses_url":"https://api.github.com/repos/PowerShell/xWebAdministration/statuses/985ab36bde2e5fb390d596747fbfe34e1e586a8d","head":{"label":"SNikalaichyk:dev2","ref":"dev2","sha":"985ab36bde2e5fb390d596747fbfe34e1e586a8d","user":{"login":"SNikalaichyk","id":13381926,"avatar_url":"https://avatars.githubusercontent.com/u/13381926?v=3","gravatar_id":"","url":"https://api.github.com/users/SNikalaichyk","html_url":"https://github.com/SNikalaichyk","followers_url":"https://api.github.com/users/SNikalaichyk/followers","following_url":"https://api.github.com/users/SNikalaichyk/following{/other_user}","gists_url":"https://api.github.com/users/SNikalaichyk/gists{/gist_id}","starred_url":"https://api.github.com/users/SNikalaichyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SNikalaichyk/subscriptions","organizations_url":"https://api.github.com/users/SNikalaichyk/orgs","repos_url":"https://api.github.com/users/SNikalaichyk/repos","events_url":"https://api.github.com/users/SNikalaichyk/events{/privacy}","received_events_url":"https://api.github.com/users/SNikalaichyk/received_events","type":"User","site_admin":false},"repo":{"id":39256840,"name":"xWebAdministration","full_name":"SNikalaichyk/xWebAdministration","owner":{"login":"SNikalaichyk","id":13381926,"avatar_url":"https://avatars.githubusercontent.com/u/13381926?v=3","gravatar_id":"","url":"https://api.github.com/users/SNikalaichyk","html_url":"https://github.com/SNikalaichyk","followers_url":"https://api.github.com/users/SNikalaichyk/followers","following_url":"https://api.github.com/users/SNikalaichyk/following{/other_user}","gists_url":"https://api.github.com/users/SNikalaichyk/gists{/gist_id}","starred_url":"https://api.github.com/users/SNikalaichyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SNikalaichyk/subscriptions","organizations_url":"https://api.github.com/users/SNikalaichyk/orgs","repos_url":"https://api.github.com/users/SNikalaichyk/repos","events_url":"https://api.github.com/users/SNikalaichyk/events{/privacy}","received_events_url":"https://api.github.com/users/SNikalaichyk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SNikalaichyk/xWebAdministration","description":null,"fork":true,"url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration","forks_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/forks","keys_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/teams","hooks_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/hooks","issue_events_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/issues/events{/number}","events_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/events","assignees_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/assignees{/user}","branches_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/branches{/branch}","tags_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/tags","blobs_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/git/refs{/sha}","trees_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/statuses/{sha}","languages_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/languages","stargazers_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/stargazers","contributors_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/contributors","subscribers_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/subscribers","subscription_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/subscription","commits_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/commits{/sha}","git_commits_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/git/commits{/sha}","comments_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/comments{/number}","issue_comment_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/issues/comments{/number}","contents_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/contents/{+path}","compare_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/merges","archive_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/downloads","issues_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/issues{/number}","pulls_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/pulls{/number}","milestones_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/milestones{/number}","notifications_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/labels{/name}","releases_url":"https://api.github.com/repos/SNikalaichyk/xWebAdministration/releases{/id}","created_at":"2015-07-17T14:00:34Z","updated_at":"2015-10-02T20:23:35Z","pushed_at":"2015-12-02T18:15:06Z","git_url":"git://github.com/SNikalaichyk/xWebAdministration.git","ssh_url":"git@github.com:SNikalaichyk/xWebAdministration.git","clone_url":"https://github.com/SNikalaichyk/xWebAdministration.git","svn_url":"https://github.com/SNikalaichyk/xWebAdministration","homepage":null,"size":208,"stargazers_count":1,"watchers_count":1,"language":"PowerShell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"dev"}},"base":{"label":"PowerShell:dev","ref":"dev","sha":"c81885ff094625c390c26c5afb3dee033d78aaca","user":{"login":"PowerShell","id":11524380,"avatar_url":"https://avatars.githubusercontent.com/u/11524380?v=3","gravatar_id":"","url":"https://api.github.com/users/PowerShell","html_url":"https://github.com/PowerShell","followers_url":"https://api.github.com/users/PowerShell/followers","following_url":"https://api.github.com/users/PowerShell/following{/other_user}","gists_url":"https://api.github.com/users/PowerShell/gists{/gist_id}","starred_url":"https://api.github.com/users/PowerShell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PowerShell/subscriptions","organizations_url":"https://api.github.com/users/PowerShell/orgs","repos_url":"https://api.github.com/users/PowerShell/repos","events_url":"https://api.github.com/users/PowerShell/events{/privacy}","received_events_url":"https://api.github.com/users/PowerShell/received_events","type":"Organization","site_admin":false},"repo":{"id":34022265,"name":"xWebAdministration","full_name":"PowerShell/xWebAdministration","owner":{"login":"PowerShell","id":11524380,"avatar_url":"https://avatars.githubusercontent.com/u/11524380?v=3","gravatar_id":"","url":"https://api.github.com/users/PowerShell","html_url":"https://github.com/PowerShell","followers_url":"https://api.github.com/users/PowerShell/followers","following_url":"https://api.github.com/users/PowerShell/following{/other_user}","gists_url":"https://api.github.com/users/PowerShell/gists{/gist_id}","starred_url":"https://api.github.com/users/PowerShell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PowerShell/subscriptions","organizations_url":"https://api.github.com/users/PowerShell/orgs","repos_url":"https://api.github.com/users/PowerShell/repos","events_url":"https://api.github.com/users/PowerShell/events{/privacy}","received_events_url":"https://api.github.com/users/PowerShell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PowerShell/xWebAdministration","description":null,"fork":false,"url":"https://api.github.com/repos/PowerShell/xWebAdministration","forks_url":"https://api.github.com/repos/PowerShell/xWebAdministration/forks","keys_url":"https://api.github.com/repos/PowerShell/xWebAdministration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PowerShell/xWebAdministration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PowerShell/xWebAdministration/teams","hooks_url":"https://api.github.com/repos/PowerShell/xWebAdministration/hooks","issue_events_url":"https://api.github.com/repos/PowerShell/xWebAdministration/issues/events{/number}","events_url":"https://api.github.com/repos/PowerShell/xWebAdministration/events","assignees_url":"https://api.github.com/repos/PowerShell/xWebAdministration/assignees{/user}","branches_url":"https://api.github.com/repos/PowerShell/xWebAdministration/branches{/branch}","tags_url":"https://api.github.com/repos/PowerShell/xWebAdministration/tags","blobs_url":"https://api.github.com/repos/PowerShell/xWebAdministration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PowerShell/xWebAdministration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PowerShell/xWebAdministration/git/refs{/sha}","trees_url":"https://api.github.com/repos/PowerShell/xWebAdministration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PowerShell/xWebAdministration/statuses/{sha}","languages_url":"https://api.github.com/repos/PowerShell/xWebAdministration/languages","stargazers_url":"https://api.github.com/repos/PowerShell/xWebAdministration/stargazers","contributors_url":"https://api.github.com/repos/PowerShell/xWebAdministration/contributors","subscribers_url":"https://api.github.com/repos/PowerShell/xWebAdministration/subscribers","subscription_url":"https://api.github.com/repos/PowerShell/xWebAdministration/subscription","commits_url":"https://api.github.com/repos/PowerShell/xWebAdministration/commits{/sha}","git_commits_url":"https://api.github.com/repos/PowerShell/xWebAdministration/git/commits{/sha}","comments_url":"https://api.github.com/repos/PowerShell/xWebAdministration/comments{/number}","issue_comment_url":"https://api.github.com/repos/PowerShell/xWebAdministration/issues/comments{/number}","contents_url":"https://api.github.com/repos/PowerShell/xWebAdministration/contents/{+path}","compare_url":"https://api.github.com/repos/PowerShell/xWebAdministration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PowerShell/xWebAdministration/merges","archive_url":"https://api.github.com/repos/PowerShell/xWebAdministration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PowerShell/xWebAdministration/downloads","issues_url":"https://api.github.com/repos/PowerShell/xWebAdministration/issues{/number}","pulls_url":"https://api.github.com/repos/PowerShell/xWebAdministration/pulls{/number}","milestones_url":"https://api.github.com/repos/PowerShell/xWebAdministration/milestones{/number}","notifications_url":"https://api.github.com/repos/PowerShell/xWebAdministration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PowerShell/xWebAdministration/labels{/name}","releases_url":"https://api.github.com/repos/PowerShell/xWebAdministration/releases{/id}","created_at":"2015-04-15T22:43:09Z","updated_at":"2015-11-13T13:34:06Z","pushed_at":"2015-12-03T00:23:15Z","git_url":"git://github.com/PowerShell/xWebAdministration.git","ssh_url":"git@github.com:PowerShell/xWebAdministration.git","clone_url":"https://github.com/PowerShell/xWebAdministration.git","svn_url":"https://github.com/PowerShell/xWebAdministration","homepage":null,"size":272,"stargazers_count":13,"watchers_count":13,"language":"PowerShell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":21,"forks":30,"open_issues":21,"watchers":13,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/PowerShell/xWebAdministration/pulls/65"},"html":{"href":"https://github.com/PowerShell/xWebAdministration/pull/65"},"issue":{"href":"https://api.github.com/repos/PowerShell/xWebAdministration/issues/65"},"comments":{"href":"https://api.github.com/repos/PowerShell/xWebAdministration/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/PowerShell/xWebAdministration/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/PowerShell/xWebAdministration/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PowerShell/xWebAdministration/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/PowerShell/xWebAdministration/statuses/985ab36bde2e5fb390d596747fbfe34e1e586a8d"}}}}