private static UpdateCollection getUpdates() { Console.WriteLine("Getting updates from WSUS.."); IUpdateServer server = AdminProxy.GetUpdateServer("localhost", false, 8530); UpdateScope scope = new UpdateScope(); UpdateCategoryCollection categories = server.GetUpdateCategories(); foreach (IUpdateCategory cat in categories) { if (cat.Description.Contains("10")) { Console.WriteLine(cat.Description); scope.Categories.Add(cat); } } int updateCount = server.GetUpdateCount(scope); Console.WriteLine($"Updates found: {updateCount}"); UpdateCollection updates = server.GetUpdates(scope); return(updates); }