public Task ConfigureNetworkInterfaceAsync(NetworkInterfaceConfig config) { return(Task.Run(() => ConfigureNetworkInterface(config))); }
public static void AddIPAddressToNetworkInterface(NetworkInterfaceConfig config) { var command = @"netsh interface ipv4 add address '" + config.Name + @"' " + config.IPAddress + @" " + config.Subnetmask; PowerShellHelper.ExecuteCommand(command, true); }
public static void RemoveIPAddressFromNetworkInterface(NetworkInterfaceConfig config) { var command = @"netsh interface ipv4 delete address '" + config.Name + @"' " + config.IPAddress; PowerShellHelper.ExecuteCommand(command, true); }
public static Task AddIPAddressToNetworkInterfaceAsync(NetworkInterfaceConfig config) { return(Task.Run(() => AddIPAddressToNetworkInterface(config))); }
public static Task RemoveIPAddressFromNetworkInterfaceAsync(NetworkInterfaceConfig config) { return(Task.Run(() => RemoveIPAddressFromNetworkInterface(config))); }