StatCounter

View My Stats
Showing posts with label To Execute the Remote Machine Process Example To reset the iis of remote machine. Show all posts
Showing posts with label To Execute the Remote Machine Process Example To reset the iis of remote machine. Show all posts

Saturday, February 14, 2009

To Execute the Remote Machine Process Example To reset the iis of remote machine

To Execute the Remote Machine Process  Example To reset the iis of remote machine


ProcessStartInfo psi = new ProcessStartInfo("iisreset.exe", "RematoreMachineName -stop");
psi.UserName = "RemoteMachineUserName";
psi.Domain = "DomainNameOfRemoteMachine";
psi.UseShellExecute = false;
string password = "RemoteMachinePassword";
System.Security.SecureString o = new System.Security.SecureString();
foreach (char c in password)
{
o.AppendChar(c);
}
psi.Password = o;
Process.Start(psi);