Exemplo n.º 1
0
 public override void Run(Dictionary <String, Parameter> RunParams)
 {
     if (RunParams.TryGetValue("ComputerName", out Parameter computer))
     {
         if (RunParams.TryGetValue("Command", out Parameter command))
         {
             foreach (string cmd in command.Value)
             {
                 WMI.WMIExecute(computer.Value, cmd, null, null);
             }
         }
         else
         {
             Printing.Error("No command specified");
         }
     }
 }
Exemplo n.º 2
0
 public void TestWMIExecute()
 {
     Assert.IsNotNull(WMI.WMIExecute("win16", "powershell.exe", "DEV-COBBR\\TestAdmin", "Password123!"));
 }