public static void DisableIPv6(PowershellCommand ps)
 {
     try
     {
         ConsoleText.Yellow("Disabling IPv6...");
         foreach (string host in _hostnames)
         {
             Console.WriteLine(host);
             StringBuilder s = ps.ExecuteRemote(host, @"New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters -Name DisabledComponents -PropertyType DWord -Value 0xffffffff");
         }
         if (Configuration.RestartForIPV6)
         {
             Console.WriteLine("Restarting all Hosts for IPv4 resolution to take effect...");
             ps.ExecuteRemoteAsync("Restart-Computer -ComputerName "
                 + String.Join(",", Global.Hostnames.ToArray()) + " -Force -Wait -For WinRM -Timeout 180");
         }
         ConsoleText.Green("Done");
     }
     catch (Exception ex)
     {
         Global.Log.Error(ex.ToString());
         throw;
     }
 }
 public static void StartServices(PowershellCommand ps)
 {
     if (Configuration.StartServices)
     {
         try
         {
             foreach (string host in _hostnames)
             {
                 ConsoleText.Yellow("Starting services on " + host);
                 ps.ExecuteRemoteAsync("invoke-command -computername " + host
                     + @" -scriptblock {C:\HDP\hadoop\start_local_hdp_services}");
             }
         }
         catch (Exception ex)
         {
             Global.Log.Error(ex.ToString());
             throw;
         }
     }
 }
 public static void RunSmokeTests(PowershellCommand ps)
 {
     if (Configuration.RunSmokeTests)
     {
         try
         {
             ConsoleText.Yellow("Running Smoke Tests...");
             ps.ExecuteRemoteAsync("invoke-command -computername " + Global.ClusterProperties["NAMENODE_HOST"]
                     + @" -scriptblock {" + Configuration.HDPDir + @"\hadoop\Run-SmokeTests.cmd}");
             ConsoleText.Green("HDP Installation Complete. Press any key to exit...");
             Console.ReadKey();
         }
         catch (Exception ex)
         {
             Global.Log.Error(ex.ToString());
             throw;
         }
     }
 }