From be74f191c7b109b5c47bb0815b3780e1c3a1c22a Mon Sep 17 00:00:00 2001 From: Lev Rusanov <30170278+JDM170@users.noreply.github.com> Date: Thu, 1 May 2025 11:52:43 +0700 Subject: [PATCH] Update Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com> --- CHANGELOG.md | 3 +++ Program.cs | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8b784d..ee64401 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 01-05-2025 +* Feat: Добавлено разделение по рабочим местам при массовой смене пароля + ## 06-03-2025 (Релиз 1.0) * Refactor: Замена Console на AnsiConsole * Refactor: Изменена реализация ввода паролей diff --git a/Program.cs b/Program.cs index ca9574a..5f2a539 100644 --- a/Program.cs +++ b/Program.cs @@ -424,6 +424,10 @@ namespace domain_utility if (remote == "all") { + string armListKey = AnsiConsole.Prompt( + new TextPrompt("Введите УЗ на которой нужно сменить пароль") + .AddChoices(new string[] { "OBR", "PIS", "OBM", "MMP" }) + ); InputDomainCredentials(); string path = Path.Combine(Environment.CurrentDirectory, "settings.json"); if (!File.Exists(path)) @@ -437,6 +441,8 @@ namespace domain_utility foreach (KeyValuePair> unit in data.arm_list) { unitKey = unit.Key; + if (unitKey != armListKey) + continue; foreach (int position in unit.Value) { remote = CheckComputerName($"{unitKey}{(position < 10 ? $"0{position}" : position.ToString())}");