{"action":"created","comment":{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/comments/126163452","pull_request_review_id":48624116,"id":126163452,"diff_hunk":"@@ -42,43 +38,40 @@ Returns all Security Audits for the local and sql2016 SQL Server instances\n #>\n \t[CmdletBinding()]\n \tParam (\n-\t\t[parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $True)]\n-\t\t[DbaInstanceParameter]$SqlInstance,\n+\t\t[parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)]\n+\t\t[DbaInstanceParameter[]]$SqlInstance,\n \t\t[PSCredential][System.Management.Automation.CredentialAttribute()]$Credential,\n \t\t[switch]$Silent\n \t)\n \t\n-\tprocess\n-\t{\n+\tprocess {\n \t\tforeach ($instance in $SqlInstance)\n \t\t{\n-\t\t\tWrite-Verbose \"Attempting to connect to $instance\"\n-\t\t\ttry\n-\t\t\t{\n+\t\t\ttry {\n+\t\t\t\tWrite-Message -Level Verbose -Message \"Connecting to $instance\"\n \t\t\t\t$server = Connect-SqlInstance -SqlInstance $instance -SqlCredential $Credential","path":"functions/Get-DbaServerAudit.ps1","position":57,"original_position":57,"commit_id":"098eefd6f22aee63636bd7117f3edc8a6b239f71","original_commit_id":"098eefd6f22aee63636bd7117f3edc8a6b239f71","user":{"login":"wsmelton","id":11204251,"avatar_url":"https://avatars1.githubusercontent.com/u/11204251?v=3","gravatar_id":"","url":"https://api.github.com/users/wsmelton","html_url":"https://github.com/wsmelton","followers_url":"https://api.github.com/users/wsmelton/followers","following_url":"https://api.github.com/users/wsmelton/following{/other_user}","gists_url":"https://api.github.com/users/wsmelton/gists{/gist_id}","starred_url":"https://api.github.com/users/wsmelton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsmelton/subscriptions","organizations_url":"https://api.github.com/users/wsmelton/orgs","repos_url":"https://api.github.com/users/wsmelton/repos","events_url":"https://api.github.com/users/wsmelton/events{/privacy}","received_events_url":"https://api.github.com/users/wsmelton/received_events","type":"User","site_admin":false},"body":"This can be updated to the following to note minimum version of SQL Server it supports:\r\n\r\n```\r\n$server = Connect-SqlInstance -SqlInstance $instance -SqlCredential $Credential -MinimumVersion 10\r\n```\r\n\r\nThis now handles the warning message and outputs as such:\r\n```\r\nWARNING: [Get-DbaServerAudit][09:40:08] Failure | SQL Server version 10 required - [$instance] not supported.\r\n```","created_at":"2017-07-07T14:40:46Z","updated_at":"2017-07-07T14:50:31Z","html_url":"https://github.com/sqlcollaborative/dbatools/pull/1606#discussion_r126163452","pull_request_url":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1606","_links":{"self":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/comments/126163452"},"html":{"href":"https://github.com/sqlcollaborative/dbatools/pull/1606#discussion_r126163452"},"pull_request":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1606"}}},"pull_request":{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1606","id":129289940,"html_url":"https://github.com/sqlcollaborative/dbatools/pull/1606","diff_url":"https://github.com/sqlcollaborative/dbatools/pull/1606.diff","patch_url":"https://github.com/sqlcollaborative/dbatools/pull/1606.patch","issue_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/1606","number":1606,"state":"open","locked":false,"title":"Get-DbaServerAudit, return info if no audits found","user":{"login":"niphlod","id":122119,"avatar_url":"https://avatars1.githubusercontent.com/u/122119?v=3","gravatar_id":"","url":"https://api.github.com/users/niphlod","html_url":"https://github.com/niphlod","followers_url":"https://api.github.com/users/niphlod/followers","following_url":"https://api.github.com/users/niphlod/following{/other_user}","gists_url":"https://api.github.com/users/niphlod/gists{/gist_id}","starred_url":"https://api.github.com/users/niphlod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niphlod/subscriptions","organizations_url":"https://api.github.com/users/niphlod/orgs","repos_url":"https://api.github.com/users/niphlod/repos","events_url":"https://api.github.com/users/niphlod/events{/privacy}","received_events_url":"https://api.github.com/users/niphlod/received_events","type":"User","site_admin":false},"body":"Fixes #1603 \r\n\r\nChanges proposed in this pull request:\r\n - return info if no audits are found\r\n - process multiple instances\r\n - \r\n\r\nHow to test this code: \r\n- [ ] Get a server with an audit, no cyan message returned\r\n- [ ] Get a server with no audit, a cyan message is returned\r\n\r\nStyle cops: please see if I got all the needed bits.","created_at":"2017-07-06T21:55:59Z","updated_at":"2017-07-07T14:50:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa96131dcb5cca1b6a0cdb73c1d5dd48537d9833","assignee":null,"assignees":[],"requested_reviewers":[{"login":"gbargsley","id":169602,"avatar_url":"https://avatars1.githubusercontent.com/u/169602?v=3","gravatar_id":"","url":"https://api.github.com/users/gbargsley","html_url":"https://github.com/gbargsley","followers_url":"https://api.github.com/users/gbargsley/followers","following_url":"https://api.github.com/users/gbargsley/following{/other_user}","gists_url":"https://api.github.com/users/gbargsley/gists{/gist_id}","starred_url":"https://api.github.com/users/gbargsley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gbargsley/subscriptions","organizations_url":"https://api.github.com/users/gbargsley/orgs","repos_url":"https://api.github.com/users/gbargsley/repos","events_url":"https://api.github.com/users/gbargsley/events{/privacy}","received_events_url":"https://api.github.com/users/gbargsley/received_events","type":"User","site_admin":false},{"login":"potatoqualitee","id":8278033,"avatar_url":"https://avatars2.githubusercontent.com/u/8278033?v=3","gravatar_id":"","url":"https://api.github.com/users/potatoqualitee","html_url":"https://github.com/potatoqualitee","followers_url":"https://api.github.com/users/potatoqualitee/followers","following_url":"https://api.github.com/users/potatoqualitee/following{/other_user}","gists_url":"https://api.github.com/users/potatoqualitee/gists{/gist_id}","starred_url":"https://api.github.com/users/potatoqualitee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/potatoqualitee/subscriptions","organizations_url":"https://api.github.com/users/potatoqualitee/orgs","repos_url":"https://api.github.com/users/potatoqualitee/repos","events_url":"https://api.github.com/users/potatoqualitee/events{/privacy}","received_events_url":"https://api.github.com/users/potatoqualitee/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1606/commits","review_comments_url":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1606/comments","review_comment_url":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/1606/comments","statuses_url":"https://api.github.com/repos/sqlcollaborative/dbatools/statuses/098eefd6f22aee63636bd7117f3edc8a6b239f71","head":{"label":"niphlod:fix/1605","ref":"fix/1605","sha":"098eefd6f22aee63636bd7117f3edc8a6b239f71","user":{"login":"niphlod","id":122119,"avatar_url":"https://avatars1.githubusercontent.com/u/122119?v=3","gravatar_id":"","url":"https://api.github.com/users/niphlod","html_url":"https://github.com/niphlod","followers_url":"https://api.github.com/users/niphlod/followers","following_url":"https://api.github.com/users/niphlod/following{/other_user}","gists_url":"https://api.github.com/users/niphlod/gists{/gist_id}","starred_url":"https://api.github.com/users/niphlod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niphlod/subscriptions","organizations_url":"https://api.github.com/users/niphlod/orgs","repos_url":"https://api.github.com/users/niphlod/repos","events_url":"https://api.github.com/users/niphlod/events{/privacy}","received_events_url":"https://api.github.com/users/niphlod/received_events","type":"User","site_admin":false},"repo":{"id":75013850,"name":"dbatools","full_name":"niphlod/dbatools","owner":{"login":"niphlod","id":122119,"avatar_url":"https://avatars1.githubusercontent.com/u/122119?v=3","gravatar_id":"","url":"https://api.github.com/users/niphlod","html_url":"https://github.com/niphlod","followers_url":"https://api.github.com/users/niphlod/followers","following_url":"https://api.github.com/users/niphlod/following{/other_user}","gists_url":"https://api.github.com/users/niphlod/gists{/gist_id}","starred_url":"https://api.github.com/users/niphlod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niphlod/subscriptions","organizations_url":"https://api.github.com/users/niphlod/orgs","repos_url":"https://api.github.com/users/niphlod/repos","events_url":"https://api.github.com/users/niphlod/events{/privacy}","received_events_url":"https://api.github.com/users/niphlod/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/niphlod/dbatools","description":"PowerShell module to help dbas be more productive","fork":true,"url":"https://api.github.com/repos/niphlod/dbatools","forks_url":"https://api.github.com/repos/niphlod/dbatools/forks","keys_url":"https://api.github.com/repos/niphlod/dbatools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/niphlod/dbatools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/niphlod/dbatools/teams","hooks_url":"https://api.github.com/repos/niphlod/dbatools/hooks","issue_events_url":"https://api.github.com/repos/niphlod/dbatools/issues/events{/number}","events_url":"https://api.github.com/repos/niphlod/dbatools/events","assignees_url":"https://api.github.com/repos/niphlod/dbatools/assignees{/user}","branches_url":"https://api.github.com/repos/niphlod/dbatools/branches{/branch}","tags_url":"https://api.github.com/repos/niphlod/dbatools/tags","blobs_url":"https://api.github.com/repos/niphlod/dbatools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/niphlod/dbatools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/niphlod/dbatools/git/refs{/sha}","trees_url":"https://api.github.com/repos/niphlod/dbatools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/niphlod/dbatools/statuses/{sha}","languages_url":"https://api.github.com/repos/niphlod/dbatools/languages","stargazers_url":"https://api.github.com/repos/niphlod/dbatools/stargazers","contributors_url":"https://api.github.com/repos/niphlod/dbatools/contributors","subscribers_url":"https://api.github.com/repos/niphlod/dbatools/subscribers","subscription_url":"https://api.github.com/repos/niphlod/dbatools/subscription","commits_url":"https://api.github.com/repos/niphlod/dbatools/commits{/sha}","git_commits_url":"https://api.github.com/repos/niphlod/dbatools/git/commits{/sha}","comments_url":"https://api.github.com/repos/niphlod/dbatools/comments{/number}","issue_comment_url":"https://api.github.com/repos/niphlod/dbatools/issues/comments{/number}","contents_url":"https://api.github.com/repos/niphlod/dbatools/contents/{+path}","compare_url":"https://api.github.com/repos/niphlod/dbatools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/niphlod/dbatools/merges","archive_url":"https://api.github.com/repos/niphlod/dbatools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/niphlod/dbatools/downloads","issues_url":"https://api.github.com/repos/niphlod/dbatools/issues{/number}","pulls_url":"https://api.github.com/repos/niphlod/dbatools/pulls{/number}","milestones_url":"https://api.github.com/repos/niphlod/dbatools/milestones{/number}","notifications_url":"https://api.github.com/repos/niphlod/dbatools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/niphlod/dbatools/labels{/name}","releases_url":"https://api.github.com/repos/niphlod/dbatools/releases{/id}","deployments_url":"https://api.github.com/repos/niphlod/dbatools/deployments","created_at":"2016-11-28T21:01:53Z","updated_at":"2016-11-28T21:01:54Z","pushed_at":"2017-07-06T21:52:39Z","git_url":"git://github.com/niphlod/dbatools.git","ssh_url":"git@github.com:niphlod/dbatools.git","clone_url":"https://github.com/niphlod/dbatools.git","svn_url":"https://github.com/niphlod/dbatools","homepage":"https://dbatools.io","size":7677,"stargazers_count":0,"watchers_count":0,"language":"PowerShell","has_issues":false,"has_projects":true,"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":0,"default_branch":"master"}},"base":{"label":"sqlcollaborative:development","ref":"development","sha":"a46528a93e09073ab7d890b4689ee8e412ba2762","user":{"login":"sqlcollaborative","id":22203347,"avatar_url":"https://avatars0.githubusercontent.com/u/22203347?v=3","gravatar_id":"","url":"https://api.github.com/users/sqlcollaborative","html_url":"https://github.com/sqlcollaborative","followers_url":"https://api.github.com/users/sqlcollaborative/followers","following_url":"https://api.github.com/users/sqlcollaborative/following{/other_user}","gists_url":"https://api.github.com/users/sqlcollaborative/gists{/gist_id}","starred_url":"https://api.github.com/users/sqlcollaborative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sqlcollaborative/subscriptions","organizations_url":"https://api.github.com/users/sqlcollaborative/orgs","repos_url":"https://api.github.com/users/sqlcollaborative/repos","events_url":"https://api.github.com/users/sqlcollaborative/events{/privacy}","received_events_url":"https://api.github.com/users/sqlcollaborative/received_events","type":"Organization","site_admin":false},"repo":{"id":30215226,"name":"dbatools","full_name":"sqlcollaborative/dbatools","owner":{"login":"sqlcollaborative","id":22203347,"avatar_url":"https://avatars0.githubusercontent.com/u/22203347?v=3","gravatar_id":"","url":"https://api.github.com/users/sqlcollaborative","html_url":"https://github.com/sqlcollaborative","followers_url":"https://api.github.com/users/sqlcollaborative/followers","following_url":"https://api.github.com/users/sqlcollaborative/following{/other_user}","gists_url":"https://api.github.com/users/sqlcollaborative/gists{/gist_id}","starred_url":"https://api.github.com/users/sqlcollaborative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sqlcollaborative/subscriptions","organizations_url":"https://api.github.com/users/sqlcollaborative/orgs","repos_url":"https://api.github.com/users/sqlcollaborative/repos","events_url":"https://api.github.com/users/sqlcollaborative/events{/privacy}","received_events_url":"https://api.github.com/users/sqlcollaborative/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sqlcollaborative/dbatools","description":"PowerShell module to help SQL Server Pros be more productive","fork":false,"url":"https://api.github.com/repos/sqlcollaborative/dbatools","forks_url":"https://api.github.com/repos/sqlcollaborative/dbatools/forks","keys_url":"https://api.github.com/repos/sqlcollaborative/dbatools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sqlcollaborative/dbatools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sqlcollaborative/dbatools/teams","hooks_url":"https://api.github.com/repos/sqlcollaborative/dbatools/hooks","issue_events_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/events{/number}","events_url":"https://api.github.com/repos/sqlcollaborative/dbatools/events","assignees_url":"https://api.github.com/repos/sqlcollaborative/dbatools/assignees{/user}","branches_url":"https://api.github.com/repos/sqlcollaborative/dbatools/branches{/branch}","tags_url":"https://api.github.com/repos/sqlcollaborative/dbatools/tags","blobs_url":"https://api.github.com/repos/sqlcollaborative/dbatools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sqlcollaborative/dbatools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sqlcollaborative/dbatools/git/refs{/sha}","trees_url":"https://api.github.com/repos/sqlcollaborative/dbatools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sqlcollaborative/dbatools/statuses/{sha}","languages_url":"https://api.github.com/repos/sqlcollaborative/dbatools/languages","stargazers_url":"https://api.github.com/repos/sqlcollaborative/dbatools/stargazers","contributors_url":"https://api.github.com/repos/sqlcollaborative/dbatools/contributors","subscribers_url":"https://api.github.com/repos/sqlcollaborative/dbatools/subscribers","subscription_url":"https://api.github.com/repos/sqlcollaborative/dbatools/subscription","commits_url":"https://api.github.com/repos/sqlcollaborative/dbatools/commits{/sha}","git_commits_url":"https://api.github.com/repos/sqlcollaborative/dbatools/git/commits{/sha}","comments_url":"https://api.github.com/repos/sqlcollaborative/dbatools/comments{/number}","issue_comment_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/comments{/number}","contents_url":"https://api.github.com/repos/sqlcollaborative/dbatools/contents/{+path}","compare_url":"https://api.github.com/repos/sqlcollaborative/dbatools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sqlcollaborative/dbatools/merges","archive_url":"https://api.github.com/repos/sqlcollaborative/dbatools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sqlcollaborative/dbatools/downloads","issues_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues{/number}","pulls_url":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls{/number}","milestones_url":"https://api.github.com/repos/sqlcollaborative/dbatools/milestones{/number}","notifications_url":"https://api.github.com/repos/sqlcollaborative/dbatools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sqlcollaborative/dbatools/labels{/name}","releases_url":"https://api.github.com/repos/sqlcollaborative/dbatools/releases{/id}","deployments_url":"https://api.github.com/repos/sqlcollaborative/dbatools/deployments","created_at":"2015-02-02T23:50:31Z","updated_at":"2017-07-07T11:28:56Z","pushed_at":"2017-07-07T14:40:51Z","git_url":"git://github.com/sqlcollaborative/dbatools.git","ssh_url":"git@github.com:sqlcollaborative/dbatools.git","clone_url":"https://github.com/sqlcollaborative/dbatools.git","svn_url":"https://github.com/sqlcollaborative/dbatools","homepage":"https://dbatools.io","size":7538,"stargazers_count":328,"watchers_count":328,"language":"PowerShell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":183,"mirror_url":null,"open_issues_count":246,"forks":183,"open_issues":246,"watchers":328,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1606"},"html":{"href":"https://github.com/sqlcollaborative/dbatools/pull/1606"},"issue":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/1606"},"comments":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/1606/comments"},"review_comments":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1606/comments"},"review_comment":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1606/commits"},"statuses":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/statuses/098eefd6f22aee63636bd7117f3edc8a6b239f71"}}}}
{"actor":{"display_login":"wsmelton"}}