public RemoteNServiceBusInstallTask(string exeName, string location, string instanceName, PhysicalServer site, string username, string password, string serviceName, string displayName, string description, bool startManually) { StringBuilder args = new StringBuilder("/install "); if (username != null && password != null) { var user = username; var pass = password; if (username.ShouldPrompt()) user = _prompt.Prompt("Win Service '{0}' UserName".FormatWith(exeName)); if (password.ShouldPrompt()) pass = _prompt.Prompt("Win Service '{0}' For User '{1}' Password".FormatWith(exeName, username)); args.Append(" /username:{0} /password:{1}".FormatWith(user, pass)); } if (!string.IsNullOrEmpty(instanceName)) args.AppendFormat(" /instanceName:{0}", instanceName); if (!string.IsNullOrEmpty(serviceName)) args.AppendFormat(" /serviceName:{0}", serviceName); if (!string.IsNullOrEmpty(displayName)) args.AppendFormat(" /displayName:{0}", displayName); if (!string.IsNullOrEmpty(description)) args.AppendFormat(" /description:{0}", description); if (startManually) args.Append(" /startManually"); _task = new RemoteCommandLineTask(exeName) { Args = args.ToString(), ExecutableIsLocatedAt = location, Machine = site.Name, WorkingDirectory = location }; }
public RemoteNServiceBusHostTask(string exeName, string location, string instanceName, PhysicalServer site, string username, string password, string serviceName, string displayName, string description) { string args = string.IsNullOrEmpty(instanceName) ? "" : " /instance:\"{0}\"".FormatWith(instanceName); if (username != null && password != null) { var user = username; var pass = password; if (username.ShouldPrompt()) user = _prompt.Prompt("Win Service '{0}' UserName".FormatWith(exeName)); if (shouldPromptForPassword(username, password)) pass = _prompt.Prompt("Win Service '{0}' For User '{1}' Password".FormatWith(exeName, username)); args += " /userName:\"{0}\" /password:\"{1}\"".FormatWith(user, pass); } if (!string.IsNullOrEmpty(serviceName)) args += " /serviceName:\"{0}\"".FormatWith(serviceName); if (!string.IsNullOrEmpty(displayName)) args += " /displayName:\"{0}\"".FormatWith(displayName); if (!string.IsNullOrEmpty(description)) args += " /description:\"{0}\"".FormatWith(description); _task = new RemoteCommandLineTask(exeName) { Args = "/install" + args, ExecutableIsLocatedAt = location, Machine = site.Name, WorkingDirectory = location }; }
public RemoteTopshelfTask(string exeName, string location, string instanceName, PhysicalServer site, string username, string password) { string args = string.IsNullOrEmpty(instanceName) ? "" : " /instance:" + instanceName; if (username != null && password != null) { var user = username; var pass = password; if (username.ShouldPrompt()) user = _prompt.Prompt("Win Service '{0}' UserName".FormatWith(exeName)); if (password.ShouldPrompt()) pass = _prompt.Prompt("Win Service '{0}' For User '{1}' Password".FormatWith(exeName, username)); args += " /username:{0} /password:{1}".FormatWith(user, pass); } _task = new RemoteCommandLineTask(exeName) { Args = "install" + args, ExecutableIsLocatedAt = location, Machine = site.Name, WorkingDirectory = location }; }
public RemoteTopshelfTask(string exeName, string location, string instanceName, PhysicalServer site, string username, string password) { string args = string.IsNullOrEmpty(instanceName) ? "" : " /instance:" + instanceName; if (username != null && password != null) { var user = username; var pass = password; if (username.ShouldPrompt()) { user = _prompt.Prompt("Win Service '{0}' UserName".FormatWith(exeName)); } if (password.ShouldPrompt()) { pass = _prompt.Prompt("Win Service '{0}' For User '{1}' Password".FormatWith(exeName, username)); } args += " /username:{0} /password:{1}".FormatWith(user, pass); } _task = new RemoteCommandLineTask(exeName) { Args = "install" + args, ExecutableIsLocatedAt = location, Machine = site.Name, WorkingDirectory = location }; }
public RemoteNServiceBusHostTask(string exeName, string location, PhysicalServer site, NServiceBusHostExeArgs args) { _task = new RemoteCommandLineTask(exeName) { Args = args.ToString(), ExecutableIsLocatedAt = location, Machine = site.Name, WorkingDirectory = location }; }
public RemoteInstallRavenDbAsServiceTask(PhysicalServer site, string location) { _location = location; _task = new RemoteCommandLineTask(RavenConstants.RavenServerExecutable) { Args = RavenConstants.RavenAsServiceInstallSwitch, ExecutableIsLocatedAt = location, Machine = site.Name, WorkingDirectory = location }; }
public DeploymentResult CreateQueue(QueueAddress path) { var t = new RemoteCommandLineTask("dropkick.remote.exe") { Args = "create_queue {0}".FormatWith(path.ActualUri), ExecutableIsLocatedAt = @"C:\Temp\dropkick.remote\", Machine = _server.Name, WorkingDirectory = @"C:\Temp\dropkick.remote\" }; return(t.Execute()); }
public RemoteNServiceBusHostTask(string exeName, string location, string instanceName, PhysicalServer site, string username, string password, string serviceName, string displayName, string description, string profiles) { string args = string.IsNullOrEmpty(instanceName) ? "" : " /instance:\"{0}\"".FormatWith(instanceName); if (username != null && password != null) { var user = username; var pass = password; if (username.ShouldPrompt()) { user = _prompt.Prompt("Win Service '{0}' UserName".FormatWith(exeName)); } if (shouldPromptForPassword(username, password)) { pass = _prompt.Prompt("Win Service '{0}' For User '{1}' Password".FormatWith(exeName, username)); } args += " /userName:\"{0}\" /password:\"{1}\"".FormatWith(user, pass); } if (!string.IsNullOrEmpty(serviceName)) { args += " /serviceName:\"{0}\"".FormatWith(serviceName); } if (!string.IsNullOrEmpty(displayName)) { args += " /displayName:\"{0}\"".FormatWith(displayName); } if (!string.IsNullOrEmpty(description)) { args += " /description:\"{0}\"".FormatWith(description); } if (!string.IsNullOrEmpty(profiles)) { args += " {0}".FormatWith(profiles); } _task = new RemoteCommandLineTask(exeName) { Args = "/install" + args, ExecutableIsLocatedAt = location, Machine = site.Name, WorkingDirectory = location }; }
public RemoteNServiceBusInstallTask(string exeName, string location, string instanceName, PhysicalServer site, string username, string password, string serviceName, string displayName, string description, bool startManually) { StringBuilder args = new StringBuilder("/install "); if (username != null && password != null) { var user = username; var pass = password; if (username.ShouldPrompt()) { user = _prompt.Prompt("Win Service '{0}' UserName".FormatWith(exeName)); } if (password.ShouldPrompt()) { pass = _prompt.Prompt("Win Service '{0}' For User '{1}' Password".FormatWith(exeName, username)); } args.Append(" /username:{0} /password:{1}".FormatWith(user, pass)); } if (!string.IsNullOrEmpty(instanceName)) { args.AppendFormat(" /instanceName:{0}", instanceName); } if (!string.IsNullOrEmpty(serviceName)) { args.AppendFormat(" /serviceName:{0}", serviceName); } if (!string.IsNullOrEmpty(displayName)) { args.AppendFormat(" /displayName:{0}", displayName); } if (!string.IsNullOrEmpty(description)) { args.AppendFormat(" /description:{0}", description); } if (startManually) { args.Append(" /startManually"); } _task = new RemoteCommandLineTask(exeName) { Args = args.ToString(), ExecutableIsLocatedAt = location, Machine = site.Name, WorkingDirectory = location }; }
public RemoteNServiceBusUninstallTask(string exeName, string location, string instanceName, PhysicalServer site, string serviceName) { StringBuilder args = new StringBuilder("/uninstall "); if (!string.IsNullOrEmpty(instanceName)) args.AppendFormat(" /instance:{0}", instanceName); if (!string.IsNullOrEmpty(serviceName)) args.AppendFormat(" /serviceName:{0}", serviceName); _task = new RemoteCommandLineTask(exeName) { Args = args.ToString(), ExecutableIsLocatedAt = location, Machine = site.Name, WorkingDirectory = location }; }
public void Remote() { var task = new RemoteCommandLineTask("ping") { Args = "www.fhlbtopeka.com -n 5", Machine = "SrvTestWeb01" }; var output = task.Execute(); foreach (var item in output.Results) { Console.WriteLine(item.Message); } }
public RemoteNServiceBusHostUninstallTask(string exeName, string location, string instanceName, PhysicalServer site, string serviceName) { string args = string.IsNullOrEmpty(instanceName) ? "" : " /instance:\"{0}\"".FormatWith(instanceName); if (!string.IsNullOrEmpty(serviceName)) args += " /serviceName:\"{0}\"".FormatWith(serviceName); _task = new RemoteCommandLineTask(exeName) { Args = "/install" + args, ExecutableIsLocatedAt = location, Machine = site.Name, WorkingDirectory = location }; }
public RemoteNServiceBusUninstallTask(string exeName, string location, string instanceName, PhysicalServer site, string serviceName) { StringBuilder args = new StringBuilder("/uninstall "); if (!string.IsNullOrEmpty(instanceName)) { args.AppendFormat(" /instance:{0}", instanceName); } if (!string.IsNullOrEmpty(serviceName)) { args.AppendFormat(" /serviceName:{0}", serviceName); } _task = new RemoteCommandLineTask(exeName) { Args = args.ToString(), ExecutableIsLocatedAt = location, Machine = site.Name, WorkingDirectory = location }; }
public DeploymentResult GrantPermission(QueuePermission permission, QueueAddress address, string @group) { string perm; switch (permission) { case QueuePermission.Read: perm = "r"; break; case QueuePermission.Write: perm = "w"; break; case QueuePermission.ReadWrite: perm = "rw"; break; case QueuePermission.SetSensibleDefaults: perm = "default"; break; default: perm = "r"; break; } var t = new RemoteCommandLineTask("dropkick.remote.exe") { Args = "grant {0} {1} {2}".FormatWith(perm, @group, address.ActualUri), ExecutableIsLocatedAt = @"C:\Temp\dropkick.remote\", Machine = _server.Name, WorkingDirectory = @"C:\Temp\dropkick.remote\" }; return(t.Execute()); }
public DeploymentResult GrantPermission(QueuePermission permission, QueueAddress address, string @group) { string perm; switch (permission) { case QueuePermission.Read: perm = "r"; break; case QueuePermission.Write: perm = "w"; break; case QueuePermission.ReadWrite: perm = "rw"; break; case QueuePermission.SetSensibleDefaults: perm = "default"; break; default: perm = "r"; break; } var t = new RemoteCommandLineTask("dropkick.remote.exe") { Args = "grant {0} {1} {2}".FormatWith(perm, @group, address.ActualUri), ExecutableIsLocatedAt = @"C:\Temp\dropkick.remote\", Machine = _server.Name, WorkingDirectory = @"C:\Temp\dropkick.remote\" }; return t.Execute(); }
public DeploymentResult CreateQueue(QueueAddress path) { var t = new RemoteCommandLineTask("dropkick.remote.exe") { Args = "create_queue {0}".FormatWith(path.ActualUri), ExecutableIsLocatedAt = @"C:\Temp\dropkick.remote\", Machine = _server.Name, WorkingDirectory = @"C:\Temp\dropkick.remote\" }; return t.Execute(); }