public async Task <List <CmdLineResult> > RunRemoteCmds(string hostName, TimeSpan timeout) { var cmds = new List <CmdLineResult> { new CmdLineResult { Name = "System Information", Cmd = $"C:\\Windows\\System32\\systeminfo.exe /S {hostName} /FO CSV" } }; cmds = await _collectorHelper.ExecCmds(cmds, timeout).ConfigureAwait(false); return(cmds); }
public async Task <List <CmdLineResult> > RunRemoteCmds(string hostName) { //($@"\\{hostname}\c$\Program Files\Qlik\Sense\Repository\PostgreSQL").ToList(); string postgress = await GetPostgressPath(hostName).ConfigureAwait(false); ConnectorList = await GetListOfConnctorsInstalled(hostName).ConfigureAwait(false); var connectorsConfig = await GetConnectorsConfig(ConnectorList).ConfigureAwait(false); var cmds = new List <CmdLineResult> { new CmdLineResult { Name = "Postgresql.conf", Cmd = $@"{postgress}\postgresql.conf", ExecType = CmdLineExecType.FileContent }, new CmdLineResult { Name = "postgresql_pg_hba.conf", Cmd = $@"{postgress}\pg_hba.conf", ExecType = CmdLineExecType.FileContent }, new CmdLineResult { Name = "Engine_Settings.ini", Cmd = $@"\\{hostName}\c$\ProgramData\\Qlik\\Sense\\Engine\\settings.ini", ExecType = CmdLineExecType.FileContent }, new CmdLineResult { Name = "Sense_Host.cfg", Cmd = $@"\\{hostName}\c$\ProgramData\Qlik\Sense\host.cfg", ExecType = CmdLineExecType.FileContent }, new CmdLineResult { Name = "Repository.exe.config", Cmd = $@"\\{hostName}\c$\Program Files\Qlik\Sense\Repository\Repository.exe.config", ExecType = CmdLineExecType.FileContent }, new CmdLineResult { Name = "Repository.Core.dll.config", Cmd = $@"\\{hostName}\c$\Program Files\Qlik\Sense\Repository\Repository.Core.dll.config", ExecType = CmdLineExecType.FileContent }, new CmdLineResult { Name = "Repository.Domain.dll.config", Cmd = $@"\\{hostName}\c$\Program Files\Qlik\Sense\Repository\Repository.Domain.dll.config", ExecType = CmdLineExecType.FileContent }, new CmdLineResult { Name = "Repository.Synchronization.dll.config", Cmd = $@"\{hostName}\c$\\Program Files\Qlik\Sense\Repository\Repository.Synchronization.dll.config", ExecType = CmdLineExecType.FileContent }, new CmdLineResult { Name = "Repository.User.dll.config", Cmd = $@"\\{hostName}\c$\Program Files\Qlik\Sense\Repository\Repository.User.dll.config", ExecType = CmdLineExecType.FileContent }, new CmdLineResult { Name = "Printing.exe.config", Cmd = $@"\\{hostName}\c$\Program Files\Qlik\Sense\Printing\Printing.exe.config", ExecType = CmdLineExecType.FileContent }, new CmdLineResult { Name = "Qlik.Printing.CefSharp.exe.config", Cmd = $@"\{hostName}\c$\\Program Files\Qlik\Sense\Printing\Qlik.Printing.CefSharp.exe.config", ExecType = CmdLineExecType.FileContent }, new CmdLineResult { Name = "Qlik.Sense.Printing.dll.config", Cmd = $@"\\{hostName}\\c$\\Program Files\Qlik\Sense\Printing\Qlik.Sense.Printing.dll.config", ExecType = CmdLineExecType.FileContent }, new CmdLineResult { Name = "Scheduler.exe.config", Cmd = $@"\\{hostName}\c$\Program Files\Qlik\Sense\Scheduler\Scheduler.exe.config", ExecType = CmdLineExecType.FileContent }, new CmdLineResult { Name = "Proxy.exe.config", Cmd = $@"\\{hostName}\c$\Program Files\Qlik\Sense\Proxy\Proxy.exe.config", ExecType = CmdLineExecType.FileContent }, }; cmds.AddRange(connectorsConfig); cmds = await _collectorHelper.ExecCmds(cmds).ConfigureAwait(false); cmds.Add(new CmdLineResult { Name = "ConnectorsInstalled", Result = JsonConvert.SerializeObject(ConnectorList, Formatting.Indented) }); return(cmds); }