{"action":"created","comment":{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/comments/123889140","pull_request_review_id":46137036,"id":123889140,"diff_hunk":"@@ -0,0 +1,88 @@\n+﻿function Get-DbaSqlManagementObject\n+{\n+<#\n+\t.SYNOPSIS\n+\tGets SQL Mangaement Object versions installed on the machine.\n+\n+\t.DESCRIPTION\n+\t The Get-DbaSqlManagementObject returns an object with the Version and the Add-Type Load Template for each version on the server.\n+\n+\t.PARAMETER VersionNumber\n+\tThis is the specific version number you are looking for. The function will look \n+\tfor that version only.\n+\t\n+\t.PARAMETER Silent\n+\tUse this switch to disable any kind of verbose messages\n+\t\n+\t.NOTES\n+\tOriginal Author: Ben Miller (@DBAduck - http://dbaduck.com)\n+\n+\tTags: SMO\n+\n+\tWebsite: https://dbatools.io\n+\tCopyright: (C) Chrissy LeMaire, clemaire@gmail.com\n+\tLicense: GNU GPL v3 https://opensource.org/licenses/GPL-3.0\n+\n+\t.LINK\n+\thttps://dbatools.io/Get-DbaSqlManagementObject\n+\n+\t.EXAMPLE\n+\tGet-DbaSqlManagementObject\n+\tReturns all versions of SMO on the computer\n+\t\n+\t.EXAMPLE\n+\tGet-DbaSqlManagementObject -VersionNumber 13\n+\tReturns just the version specified. If the version does not exist then it will return nothing.\n+\t\n+\n+#>\n+\t[CmdletBinding()]\n+\tparam (\n+\t\t[Parameter(Mandatory = $false, Position=0)]\n+\t\t[ValidateSet(9,10,11,12,13,14)]\n+\t\t[int]$VersionNumber = 0,\n+\t\t[switch]$Silent\n+\t)\n+\t\n+\tprocess {\n+        Write-Message -Level Verbose -Message \"Looking for SMO in the Global Assembly Cache\"\n+\t\t\n+\t\t$smolist = Get-ChildItem -Path \"$($env:SystemRoot)\\assembly\\GAC_MSIL\\Microsoft.SqlServer.Smo\" | Sort-Object Name -Desc | select -ExpandProperty Name","path":"functions/Get-DbaSqlManagementObject.ps1","position":50,"original_position":50,"commit_id":"1905a847aef946725bb0cce270874dfb14f46b32","original_commit_id":"1905a847aef946725bb0cce270874dfb14f46b32","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":"Yeah, can't say I have tried it in every environment I've been in to know if it would matter. We can just leave it as is for right now if an issue comes up around this method we can just address it then.","created_at":"2017-06-25T02:37:38Z","updated_at":"2017-06-25T02:37:38Z","html_url":"https://github.com/sqlcollaborative/dbatools/pull/1482#discussion_r123889140","pull_request_url":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1482","_links":{"self":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/comments/123889140"},"html":{"href":"https://github.com/sqlcollaborative/dbatools/pull/1482#discussion_r123889140"},"pull_request":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1482"}}},"pull_request":{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1482","id":127337863,"html_url":"https://github.com/sqlcollaborative/dbatools/pull/1482","diff_url":"https://github.com/sqlcollaborative/dbatools/pull/1482.diff","patch_url":"https://github.com/sqlcollaborative/dbatools/pull/1482.patch","issue_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/1482","number":1482,"state":"open","locked":false,"title":"Get dba sql management object","user":{"login":"dbaduck","id":9053580,"avatar_url":"https://avatars3.githubusercontent.com/u/9053580?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaduck","html_url":"https://github.com/dbaduck","followers_url":"https://api.github.com/users/dbaduck/followers","following_url":"https://api.github.com/users/dbaduck/following{/other_user}","gists_url":"https://api.github.com/users/dbaduck/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaduck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaduck/subscriptions","organizations_url":"https://api.github.com/users/dbaduck/orgs","repos_url":"https://api.github.com/users/dbaduck/repos","events_url":"https://api.github.com/users/dbaduck/events{/privacy}","received_events_url":"https://api.github.com/users/dbaduck/received_events","type":"User","site_admin":false},"body":"Fixes # \r\n\r\nChanges proposed in this pull request:\r\n - \r\n - \r\n - \r\n\r\nHow to test this code: \r\n- [X] Run with nothing on the parameters and you should get all the versions on the computer \r\n- [X] Run with a -VersionNumber of a version between 9 and 14 and you will either get back a result with that version or you will get nothing \r\n- [X] Run with a -VersionNumber of 8 and you will not be able to because there is a ValidateSet for SMO Versions of 9-14. \r\n\r\nHas been tested on minimum requirements:\r\n- [X]  Powershell 3\r\n- [ ]  Windows 7\r\n- [ ]  SQL Server 2000 - This is not related to SQL Server versions only SMO\r\n\r\nHas been tested on maximum requirements:\r\n- [X]  SQL Server vNext\r\n- [X]  Windows 10\r\n- [ ]  Azure Database - Not relevant to SQL Server only SMO\r\n\r\nTests for tester:\r\n- [ ] Working/useful help content, including link to command on dbatools web site\r\n- [ ] All examples work as advertised\r\n- [ ] Does not contain template content\r\n- [ ] Does not contain excessive/unnecessary amounts of comments\r\n- [ ] Works remotely\r\n- [ ] Works locally\r\n- [ ] Works on lower versions or throws error specifying version not supported\r\n- [ ] Works with named instances\r\n- [ ] Works with clustered instances\r\n- [ ] Handles offline/read only databases\r\n- [ ] Supports multiple servers (at the command line or piped from Get-SqlRegisteredServerName)\r\n- [ ] No un-handled errors which stop the command working with multiple servers\r\n\r\n","created_at":"2017-06-24T17:51:37Z","updated_at":"2017-06-25T02:37:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4958f9b390deb1204c1a2deceb8b32f40de40218","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1482/commits","review_comments_url":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1482/comments","review_comment_url":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/1482/comments","statuses_url":"https://api.github.com/repos/sqlcollaborative/dbatools/statuses/1905a847aef946725bb0cce270874dfb14f46b32","head":{"label":"dbaduck:Get-DbaSqlManagementObject","ref":"Get-DbaSqlManagementObject","sha":"1905a847aef946725bb0cce270874dfb14f46b32","user":{"login":"dbaduck","id":9053580,"avatar_url":"https://avatars3.githubusercontent.com/u/9053580?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaduck","html_url":"https://github.com/dbaduck","followers_url":"https://api.github.com/users/dbaduck/followers","following_url":"https://api.github.com/users/dbaduck/following{/other_user}","gists_url":"https://api.github.com/users/dbaduck/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaduck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaduck/subscriptions","organizations_url":"https://api.github.com/users/dbaduck/orgs","repos_url":"https://api.github.com/users/dbaduck/repos","events_url":"https://api.github.com/users/dbaduck/events{/privacy}","received_events_url":"https://api.github.com/users/dbaduck/received_events","type":"User","site_admin":false},"repo":{"id":73431255,"name":"dbatools","full_name":"dbaduck/dbatools","owner":{"login":"dbaduck","id":9053580,"avatar_url":"https://avatars3.githubusercontent.com/u/9053580?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaduck","html_url":"https://github.com/dbaduck","followers_url":"https://api.github.com/users/dbaduck/followers","following_url":"https://api.github.com/users/dbaduck/following{/other_user}","gists_url":"https://api.github.com/users/dbaduck/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaduck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaduck/subscriptions","organizations_url":"https://api.github.com/users/dbaduck/orgs","repos_url":"https://api.github.com/users/dbaduck/repos","events_url":"https://api.github.com/users/dbaduck/events{/privacy}","received_events_url":"https://api.github.com/users/dbaduck/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dbaduck/dbatools","description":"PowerShell module to help dbas be more productive","fork":true,"url":"https://api.github.com/repos/dbaduck/dbatools","forks_url":"https://api.github.com/repos/dbaduck/dbatools/forks","keys_url":"https://api.github.com/repos/dbaduck/dbatools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dbaduck/dbatools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dbaduck/dbatools/teams","hooks_url":"https://api.github.com/repos/dbaduck/dbatools/hooks","issue_events_url":"https://api.github.com/repos/dbaduck/dbatools/issues/events{/number}","events_url":"https://api.github.com/repos/dbaduck/dbatools/events","assignees_url":"https://api.github.com/repos/dbaduck/dbatools/assignees{/user}","branches_url":"https://api.github.com/repos/dbaduck/dbatools/branches{/branch}","tags_url":"https://api.github.com/repos/dbaduck/dbatools/tags","blobs_url":"https://api.github.com/repos/dbaduck/dbatools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dbaduck/dbatools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dbaduck/dbatools/git/refs{/sha}","trees_url":"https://api.github.com/repos/dbaduck/dbatools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dbaduck/dbatools/statuses/{sha}","languages_url":"https://api.github.com/repos/dbaduck/dbatools/languages","stargazers_url":"https://api.github.com/repos/dbaduck/dbatools/stargazers","contributors_url":"https://api.github.com/repos/dbaduck/dbatools/contributors","subscribers_url":"https://api.github.com/repos/dbaduck/dbatools/subscribers","subscription_url":"https://api.github.com/repos/dbaduck/dbatools/subscription","commits_url":"https://api.github.com/repos/dbaduck/dbatools/commits{/sha}","git_commits_url":"https://api.github.com/repos/dbaduck/dbatools/git/commits{/sha}","comments_url":"https://api.github.com/repos/dbaduck/dbatools/comments{/number}","issue_comment_url":"https://api.github.com/repos/dbaduck/dbatools/issues/comments{/number}","contents_url":"https://api.github.com/repos/dbaduck/dbatools/contents/{+path}","compare_url":"https://api.github.com/repos/dbaduck/dbatools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dbaduck/dbatools/merges","archive_url":"https://api.github.com/repos/dbaduck/dbatools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dbaduck/dbatools/downloads","issues_url":"https://api.github.com/repos/dbaduck/dbatools/issues{/number}","pulls_url":"https://api.github.com/repos/dbaduck/dbatools/pulls{/number}","milestones_url":"https://api.github.com/repos/dbaduck/dbatools/milestones{/number}","notifications_url":"https://api.github.com/repos/dbaduck/dbatools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dbaduck/dbatools/labels{/name}","releases_url":"https://api.github.com/repos/dbaduck/dbatools/releases{/id}","deployments_url":"https://api.github.com/repos/dbaduck/dbatools/deployments","created_at":"2016-11-11T00:04:16Z","updated_at":"2016-11-11T00:04:18Z","pushed_at":"2017-06-24T17:08:20Z","git_url":"git://github.com/dbaduck/dbatools.git","ssh_url":"git@github.com:dbaduck/dbatools.git","clone_url":"https://github.com/dbaduck/dbatools.git","svn_url":"https://github.com/dbaduck/dbatools","homepage":"https://dbatools.io","size":6336,"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":"37e087e26ed5fa4561c09dbba2cfcb5788f4106c","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-06-24T14:02:31Z","pushed_at":"2017-06-24T20:24:04Z","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":6972,"stargazers_count":311,"watchers_count":311,"language":"PowerShell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":181,"mirror_url":null,"open_issues_count":235,"forks":181,"open_issues":235,"watchers":311,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1482"},"html":{"href":"https://github.com/sqlcollaborative/dbatools/pull/1482"},"issue":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/1482"},"comments":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/1482/comments"},"review_comments":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1482/comments"},"review_comment":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/pulls/1482/commits"},"statuses":{"href":"https://api.github.com/repos/sqlcollaborative/dbatools/statuses/1905a847aef946725bb0cce270874dfb14f46b32"}}}}
{"actor":{"display_login":"wsmelton"}}