{"action":"closed","issue":{"url":"https://api.github.com/repos/PowerShell/xSQLServer/issues/116","repository_url":"https://api.github.com/repos/PowerShell/xSQLServer","labels_url":"https://api.github.com/repos/PowerShell/xSQLServer/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/xSQLServer/issues/116/comments","events_url":"https://api.github.com/repos/PowerShell/xSQLServer/issues/116/events","html_url":"https://github.com/PowerShell/xSQLServer/issues/116","id":172803243,"number":116,"title":"xSQLServerSetup Missing system administrator account error","user":{"login":"AlexandrosIV","id":21062244,"avatar_url":"https://avatars.githubusercontent.com/u/21062244?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexandrosIV","html_url":"https://github.com/AlexandrosIV","followers_url":"https://api.github.com/users/AlexandrosIV/followers","following_url":"https://api.github.com/users/AlexandrosIV/following{/other_user}","gists_url":"https://api.github.com/users/AlexandrosIV/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexandrosIV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexandrosIV/subscriptions","organizations_url":"https://api.github.com/users/AlexandrosIV/orgs","repos_url":"https://api.github.com/users/AlexandrosIV/repos","events_url":"https://api.github.com/users/AlexandrosIV/events{/privacy}","received_events_url":"https://api.github.com/users/AlexandrosIV/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PowerShell/xSQLServer/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/PowerShell/xSQLServer/labels/duplicate","name":"duplicate","color":"cccccc"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-08-23T20:50:21Z","updated_at":"2016-09-09T22:10:48Z","closed_at":"2016-09-09T22:10:48Z","body":"Hi, I keep getting  an error trying to install SQL using \r\n\r\n xSQLServerSetup StandAloneInstall {\r\n            InstanceName = 'SPFarm'\r\n            SetupCredential = (Get-Credential sparta\\sp_admin)\r\n            Features =   'SQLEngine,FullText,SSMS'\r\n            SourcePath  = '\\\\MYWINDOWSVM01\\Binaries\\SQL2014SP2\\'\r\n}\r\n\r\nI get Exit message:   Missing system administrator account. To continue, provide at least one Windows account to provision as a SQL Server system administrator.\r\n\r\nfrom the xSQLServerSetup resource code, I can see that by default it should use the the SetupCredential param but not sure why is that not happening\r\nif($Features.Contains(\"SQLENGINE\"))\r\n    {\r\n        $Arguments += \" /SQLSysAdminAccounts=`\"\" + $SetupCredential.UserName + \"`\"\"\r\n        if($PSBoundParameters.ContainsKey(\"SQLSysAdminAccounts\"))\r\n        {\r\n            foreach($AdminAccount in $SQLSysAdminAccounts)\r\n            {\r\n                $Arguments += \" `\"$AdminAccount`\"\"\r\n            }\r\n        }\r\n        if($SecurityMode -eq \"SQL\")\r\n        {\r\n            $Arguments += \" /SAPwd=\" + $SAPwd.GetNetworkCredential().Password\r\n        }\r\n    }\r\n\r\nin the Set block I can see the call to the installer with the arguments, but not the argument for SQLSysAdminAccounts\r\nVERBOSE: [MYWINDOWSVM02]:                            [[xSQLServerSetup]StandAloneInstall] Path: \\\\MYWINDOWSVM01\\Binaries\\SQL2014SP2\\Source\\setup.exe\r\nVERBOSE: [MYWINDOWSVM02]:                            [[xSQLServerSetup]StandAloneInstall] Arguments: /Quiet=\"True\" /IAcceptSQLServerLicenseTerms=\"True\" /Actio\r\nn=\"Install\" /InstanceName=\"SPFARM\" /Features=\"SQLEngine,FullText,SSMS\"\r\n\r\nany idea what could I been doing wrong? the MOF is set to allow plain credentials and are stored and are valid  #credentials\r\n"}}
{"actor":{"display_login":"kwirkykat"}}