Browse Source

Small improvements

master
Dmitry Nefedov 1 year ago
parent
commit
8fd992d4da
  1. 67
      Wrapper/Config/config_Windows_11.json
  2. 70
      Wrapper/Localizations/de-DE/tooltip_Windows_11.json
  3. 69
      Wrapper/Localizations/en-US/tooltip_Windows_11.json
  4. 74
      Wrapper/Localizations/ru-RU/tooltip_Windows_11.json
  5. 29
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  6. 22
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  7. 11
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  8. 29
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  9. 282
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  10. 20
      src/Sophia_Script_for_Windows_11/Sophia.ps1
  11. 282
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1
  12. 20
      src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

67
Wrapper/Config/config_Windows_11.json

@ -599,7 +599,7 @@
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
"Function": "TaskViewButton", "Function": "CopilotButton",
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Hide" "Tag": "Hide"
@ -616,7 +616,7 @@
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
"Function": "TaskbarChat", "Function": "TaskViewButton",
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Hide" "Tag": "Hide"
@ -633,6 +633,23 @@
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
"Function": "TaskbarChat",
"Arg": {
"Zero": {
"Tag": "Hide"
},
"One": {
"Tag": "Show"
}
},
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Id": 319,
"Region": "UI & Personalization",
"Control": "cmb",
"Required": "false",
"Function": "SecondsInSystemClock", "Function": "SecondsInSystemClock",
"Arg": { "Arg": {
"Zero": { "Zero": {
@ -646,7 +663,27 @@
"WindowsDefault": "One" "WindowsDefault": "One"
}, },
{ {
"Id": 319, "Id": 320,
"Region": "UI & Personalization",
"Control": "cmb",
"Required": "false",
"Function": "TaskbarCombine",
"Arg": {
"Zero": {
"Tag": "Always"
},
"One": {
"Tag": "Full"
},
"Two": {
"Tag": "Never"
}
},
"Preset": "Zero",
"WindowsDefault": "Zero"
},
{
"Id": 321,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "chk", "Control": "chk",
"Required": "false", "Required": "false",
@ -663,7 +700,7 @@
"WindowsDefault": "" "WindowsDefault": ""
}, },
{ {
"Id": 320, "Id": 322,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
@ -683,7 +720,7 @@
"WindowsDefault": "Two" "WindowsDefault": "Two"
}, },
{ {
"Id": 321, "Id": 323,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
@ -700,7 +737,7 @@
"WindowsDefault": "One" "WindowsDefault": "One"
}, },
{ {
"Id": 322, "Id": 324,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
@ -717,7 +754,7 @@
"WindowsDefault": "One" "WindowsDefault": "One"
}, },
{ {
"Id": 323, "Id": 325,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
@ -734,7 +771,7 @@
"WindowsDefault": "One" "WindowsDefault": "One"
}, },
{ {
"Id": 324, "Id": 326,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
@ -751,7 +788,7 @@
"WindowsDefault": "One" "WindowsDefault": "One"
}, },
{ {
"Id": 325, "Id": 327,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
@ -768,7 +805,7 @@
"WindowsDefault": "One" "WindowsDefault": "One"
}, },
{ {
"Id": 326, "Id": 328,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
@ -785,7 +822,7 @@
"WindowsDefault": "One" "WindowsDefault": "One"
}, },
{ {
"Id": 327, "Id": 329,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
@ -802,7 +839,7 @@
"WindowsDefault": "One" "WindowsDefault": "One"
}, },
{ {
"Id": 328, "Id": 330,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
@ -819,7 +856,7 @@
"WindowsDefault": "One" "WindowsDefault": "One"
}, },
{ {
"Id": 329, "Id": 331,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
@ -839,7 +876,7 @@
"WindowsDefault": "Zero" "WindowsDefault": "Zero"
}, },
{ {
"Id": 330, "Id": 332,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
@ -856,7 +893,7 @@
"WindowsDefault": "One" "WindowsDefault": "One"
}, },
{ {
"Id": 331, "Id": 333,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",

70
Wrapper/Localizations/de-DE/tooltip_Windows_11.json

@ -527,6 +527,21 @@
{ {
"Id": 316, "Id": 316,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "CopilotButton",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Ausblenden der Schaltfläche Copilot in der Taskleiste."
},
"One": {
"Tag": "Show",
"ToolTip": "Zeigen Sie die Schaltfläche "Copilot" in der Taskleiste an (Standardeinstellung)."
}
}
},
{
"Id": 317,
"Region": "UI & Personalization",
"Function": "TaskViewButton", "Function": "TaskViewButton",
"Arg": { "Arg": {
"Zero": { "Zero": {
@ -540,7 +555,7 @@
} }
}, },
{ {
"Id": 317, "Id": 318,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "TaskbarChat", "Function": "TaskbarChat",
"Arg": { "Arg": {
@ -555,7 +570,7 @@
} }
}, },
{ {
"Id": 318, "Id": 319,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "SecondsInSystemClock", "Function": "SecondsInSystemClock",
"Arg": { "Arg": {
@ -570,7 +585,26 @@
} }
}, },
{ {
"Id": 319, "Id": 320,
"Region": "UI & Personalization",
"Function": "TaskbarCombine",
"Arg": {
"Zero": {
"Tag": "Always",
"ToolTip": "Kombinieren Sie Schaltflächen in der Taskleiste und blenden Sie Beschriftungen immer aus. (default value)."
},
"One": {
"Tag": "Full",
"ToolTip": "Taskleistenschaltflächen zusammenfassen und Beschriftungen ausblenden, wenn die Taskleiste voll ist.."
},
"Two": {
"Tag": "Never",
"ToolTip": "Kombinieren Sie die Schaltflächen der Taskleiste und blenden Sie die Beschriftungen nicht aus.."
}
}
},
{
"Id": 321,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "UnpinTaskbarShortcuts -Shortcuts", "Function": "UnpinTaskbarShortcuts -Shortcuts",
"ToolTip":"Entfernt die Verknüpfungen \"Microsoft Edge\" oder \"Microsoft Store\" von der Taskleiste", "ToolTip":"Entfernt die Verknüpfungen \"Microsoft Edge\" oder \"Microsoft Store\" von der Taskleiste",
@ -586,7 +620,7 @@
} }
}, },
{ {
"Id": 320, "Id": 322,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "ControlPanelView", "Function": "ControlPanelView",
"Arg": { "Arg": {
@ -605,7 +639,7 @@
} }
}, },
{ {
"Id": 321, "Id": 323,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "WindowsColorMode", "Function": "WindowsColorMode",
"Arg": { "Arg": {
@ -620,7 +654,7 @@
} }
}, },
{ {
"Id": 322, "Id": 324,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "AppColorMode", "Function": "AppColorMode",
"Arg": { "Arg": {
@ -635,7 +669,7 @@
} }
}, },
{ {
"Id": 323, "Id": 325,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "FirstLogonAnimation", "Function": "FirstLogonAnimation",
"Arg": { "Arg": {
@ -650,7 +684,7 @@
} }
}, },
{ {
"Id": 324, "Id": 326,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "JPEGWallpapersQuality", "Function": "JPEGWallpapersQuality",
"Arg": { "Arg": {
@ -665,7 +699,7 @@
} }
}, },
{ {
"Id": 325, "Id": 327,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "ShortcutsSuffix", "Function": "ShortcutsSuffix",
"Arg": { "Arg": {
@ -680,7 +714,7 @@
} }
}, },
{ {
"Id": 326, "Id": 328,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "PrtScnSnippingTool", "Function": "PrtScnSnippingTool",
"Arg": { "Arg": {
@ -695,7 +729,7 @@
} }
}, },
{ {
"Id": 327, "Id": 329,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "AppsLanguageSwitch", "Function": "AppsLanguageSwitch",
"Arg": { "Arg": {
@ -710,7 +744,7 @@
} }
}, },
{ {
"Id": 328, "Id": 330,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "AeroShaking", "Function": "AeroShaking",
"Arg": { "Arg": {
@ -725,7 +759,7 @@
} }
}, },
{ {
"Id": 329, "Id": 331,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "Cursors", "Function": "Cursors",
"Arg": { "Arg": {
@ -744,7 +778,7 @@
} }
}, },
{ {
"Id": 330, "Id": 332,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "FolderGroupBy", "Function": "FolderGroupBy",
"Arg": { "Arg": {
@ -759,7 +793,7 @@
} }
}, },
{ {
"Id": 331, "Id": 333,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "NavigationPaneExpand", "Function": "NavigationPaneExpand",
"Arg": { "Arg": {
@ -1520,7 +1554,7 @@
"ToolTip": "Pfad zum Symbol." "ToolTip": "Pfad zum Symbol."
} }
} }
}, },
{ {
"Id": 600, "Id": 600,
"Region": "WSL", "Region": "WSL",
@ -2148,8 +2182,8 @@
"ToolTip": "Menüoption \"In Windows Terminal öffnen\" im Kontextmenü von Ordnern ausblenden." "ToolTip": "Menüoption \"In Windows Terminal öffnen\" im Kontextmenü von Ordnern ausblenden."
}, },
"One": { "One": {
"Tag": "Show", "Tag": "Show",
"ToolTip": "Menüoption \"In Windows Terminal öffnen\" im Kontextmenü der Ordner anzeigen (Standardeinstellung)." "ToolTip": "Menüoption \"In Windows Terminal öffnen\" im Kontextmenü der Ordner anzeigen (Standardeinstellung)."
} }
} }
}, },

69
Wrapper/Localizations/en-US/tooltip_Windows_11.json

@ -527,6 +527,21 @@
{ {
"Id": 316, "Id": 316,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "CopilotButton",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Hide Copilot button on the taskbar."
},
"One": {
"Tag": "Show",
"ToolTip": "Show Copilot button on the taskbar (default value)."
}
}
},
{
"Id": 317,
"Region": "UI & Personalization",
"Function": "TaskViewButton", "Function": "TaskViewButton",
"Arg": { "Arg": {
"Zero": { "Zero": {
@ -540,7 +555,7 @@
} }
}, },
{ {
"Id": 317, "Id": 318,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "TaskbarChat", "Function": "TaskbarChat",
"Arg": { "Arg": {
@ -555,7 +570,7 @@
} }
}, },
{ {
"Id": 318, "Id": 319,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "SecondsInSystemClock", "Function": "SecondsInSystemClock",
"Arg": { "Arg": {
@ -570,7 +585,26 @@
} }
}, },
{ {
"Id": 319, "Id": 320,
"Region": "UI & Personalization",
"Function": "TaskbarCombine",
"Arg": {
"Zero": {
"Tag": "Always",
"ToolTip": "Combine taskbar buttons and always hide labels (default value)."
},
"One": {
"Tag": "Full",
"ToolTip": "Combine taskbar buttons and hide labels when taskbar is full."
},
"Two": {
"Tag": "Never",
"ToolTip": "Combine taskbar buttons and never hide labels."
}
}
},
{
"Id": 321,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "UnpinTaskbarShortcuts -Shortcuts", "Function": "UnpinTaskbarShortcuts -Shortcuts",
"ToolTip": "Unpin the \"Microsoft Edge\" and \"Microsoft Store\" shortcuts from the taskbar", "ToolTip": "Unpin the \"Microsoft Edge\" and \"Microsoft Store\" shortcuts from the taskbar",
@ -586,7 +620,7 @@
} }
}, },
{ {
"Id": 320, "Id": 322,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "ControlPanelView", "Function": "ControlPanelView",
"Arg": { "Arg": {
@ -605,7 +639,7 @@
} }
}, },
{ {
"Id": 321, "Id": 323,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "WindowsColorMode", "Function": "WindowsColorMode",
"Arg": { "Arg": {
@ -620,7 +654,7 @@
} }
}, },
{ {
"Id": 322, "Id": 324,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "AppColorMode", "Function": "AppColorMode",
"Arg": { "Arg": {
@ -635,7 +669,7 @@
} }
}, },
{ {
"Id": 323, "Id": 325,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "FirstLogonAnimation", "Function": "FirstLogonAnimation",
"Arg": { "Arg": {
@ -650,7 +684,7 @@
} }
}, },
{ {
"Id": 324, "Id": 326,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "JPEGWallpapersQuality", "Function": "JPEGWallpapersQuality",
"Arg": { "Arg": {
@ -665,7 +699,7 @@
} }
}, },
{ {
"Id": 325, "Id": 327,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "ShortcutsSuffix", "Function": "ShortcutsSuffix",
"Arg": { "Arg": {
@ -680,7 +714,7 @@
} }
}, },
{ {
"Id": 326, "Id": 328,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "PrtScnSnippingTool", "Function": "PrtScnSnippingTool",
"Arg": { "Arg": {
@ -695,7 +729,7 @@
} }
}, },
{ {
"Id": 327, "Id": 329,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "AppsLanguageSwitch", "Function": "AppsLanguageSwitch",
"Arg": { "Arg": {
@ -710,7 +744,7 @@
} }
}, },
{ {
"Id": 328, "Id": 330,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "AeroShaking", "Function": "AeroShaking",
"Arg": { "Arg": {
@ -725,7 +759,7 @@
} }
}, },
{ {
"Id": 329, "Id": 331,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "Cursors", "Function": "Cursors",
"Arg": { "Arg": {
@ -744,7 +778,7 @@
} }
}, },
{ {
"Id": 330, "Id": 332,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "FolderGroupBy", "Function": "FolderGroupBy",
"Arg": { "Arg": {
@ -759,7 +793,7 @@
} }
}, },
{ {
"Id": 331, "Id": 333,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "NavigationPaneExpand", "Function": "NavigationPaneExpand",
"Arg": { "Arg": {
@ -1521,7 +1555,6 @@
} }
} }
}, },
{ {
"Id": 600, "Id": 600,
"Region": "WSL", "Region": "WSL",
@ -2149,8 +2182,8 @@
"ToolTip": "Hide the \"Open in Windows Terminal\" item in the folders context menu." "ToolTip": "Hide the \"Open in Windows Terminal\" item in the folders context menu."
}, },
"One": { "One": {
"Tag": "Show", "Tag": "Show",
"ToolTip": "Show the \"Open in Windows Terminal\" item in the folders context menu (default value)." "ToolTip": "Show the \"Open in Windows Terminal\" item in the folders context menu (default value)."
} }
} }
}, },

74
Wrapper/Localizations/ru-RU/tooltip_Windows_11.json

@ -527,6 +527,21 @@
{ {
"Id": 316, "Id": 316,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "CopilotButton",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Скрыть кнопку Copilot с панели задач."
},
"One": {
"Tag": "Show",
"ToolTip": "Отобразить кнопку Copilot на панели задач (значение по умолчанию)."
}
}
},
{
"Id": 317,
"Region": "UI & Personalization",
"Function": "TaskViewButton", "Function": "TaskViewButton",
"Arg": { "Arg": {
"Zero": { "Zero": {
@ -540,7 +555,7 @@
} }
}, },
{ {
"Id": 317, "Id": 318,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "TaskbarChat", "Function": "TaskbarChat",
"Arg": { "Arg": {
@ -555,7 +570,7 @@
} }
}, },
{ {
"Id": 318, "Id": 319,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "SecondsInSystemClock", "Function": "SecondsInSystemClock",
"Arg": { "Arg": {
@ -570,7 +585,26 @@
} }
}, },
{ {
"Id": 319, "Id": 320,
"Region": "UI & Personalization",
"Function": "TaskbarCombine",
"Arg": {
"Zero": {
"Tag": "Always",
"ToolTip": "Объединить кнопки панели задач и всегда скрывать метки (значение по умолчанию)."
},
"One": {
"Tag": "Full",
"ToolTip": "Объединить кнопки панели задач и скрывать метки при переполнении панели задач."
},
"Two": {
"Tag": "Never",
"ToolTip": "Объединить кнопки панели задач и никогда не скрывать метки."
}
}
},
{
"Id": 321,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "UnpinTaskbarShortcuts -Shortcuts", "Function": "UnpinTaskbarShortcuts -Shortcuts",
"ToolTip": "Открепить ярлыки \"Microsoft Edge\", \"Microsoft Store\" от панели задач", "ToolTip": "Открепить ярлыки \"Microsoft Edge\", \"Microsoft Store\" от панели задач",
@ -586,7 +620,7 @@
} }
}, },
{ {
"Id": 320, "Id": 322,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "ControlPanelView", "Function": "ControlPanelView",
"Arg": { "Arg": {
@ -605,7 +639,7 @@
} }
}, },
{ {
"Id": 321, "Id": 323,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "WindowsColorMode", "Function": "WindowsColorMode",
"Arg": { "Arg": {
@ -620,7 +654,7 @@
} }
}, },
{ {
"Id": 322, "Id": 324,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "AppColorMode", "Function": "AppColorMode",
"Arg": { "Arg": {
@ -635,7 +669,7 @@
} }
}, },
{ {
"Id": 323, "Id": 325,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "FirstLogonAnimation", "Function": "FirstLogonAnimation",
"Arg": { "Arg": {
@ -650,7 +684,7 @@
} }
}, },
{ {
"Id": 324, "Id": 326,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "JPEGWallpapersQuality", "Function": "JPEGWallpapersQuality",
"Arg": { "Arg": {
@ -665,7 +699,7 @@
} }
}, },
{ {
"Id": 325, "Id": 327,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "ShortcutsSuffix", "Function": "ShortcutsSuffix",
"Arg": { "Arg": {
@ -680,7 +714,7 @@
} }
}, },
{ {
"Id": 326, "Id": 328,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "PrtScnSnippingTool", "Function": "PrtScnSnippingTool",
"Arg": { "Arg": {
@ -695,7 +729,7 @@
} }
}, },
{ {
"Id": 327, "Id": 329,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "AppsLanguageSwitch", "Function": "AppsLanguageSwitch",
"Arg": { "Arg": {
@ -710,7 +744,7 @@
} }
}, },
{ {
"Id": 328, "Id": 330,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "AeroShaking", "Function": "AeroShaking",
"Arg": { "Arg": {
@ -725,7 +759,7 @@
} }
}, },
{ {
"Id": 329, "Id": 331,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "Cursors", "Function": "Cursors",
"Arg": { "Arg": {
@ -744,7 +778,7 @@
} }
}, },
{ {
"Id": 330, "Id": 332,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "FolderGroupBy", "Function": "FolderGroupBy",
"Arg": { "Arg": {
@ -759,7 +793,7 @@
} }
}, },
{ {
"Id": 331, "Id": 333,
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "NavigationPaneExpand", "Function": "NavigationPaneExpand",
"Arg": { "Arg": {
@ -1520,7 +1554,7 @@
"ToolTip": "Путь до значка." "ToolTip": "Путь до значка."
} }
} }
}, },
{ {
"Id": 600, "Id": 600,
"Region": "WSL", "Region": "WSL",
@ -2146,11 +2180,11 @@
"Zero": { "Zero": {
"Tag": "Show", "Tag": "Show",
"ToolTip": "Отобразить пункт \"Открыть в Терминале Windows\" в контекстном меню папок (значение по умолчанию)." "ToolTip": "Отобразить пункт \"Открыть в Терминале Windows\" в контекстном меню папок (значение по умолчанию)."
}, },
"One": { "One": {
"Tag": "Hide", "Tag": "Show",
"ToolTip": "Скрыть пункт \"Открыть в Терминале Windows\" в контекстном меню папок." "ToolTip": "Show the \"Open in Windows Terminal\" item in the folders context menu (default value)."
} }
} }
}, },
{ {

29
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -209,26 +209,19 @@ public static string GetString(uint strId)
# Enable receiving updates for other Microsoft products when you update Windows # Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
# Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Check for updates # Check for updates
Start-Process -FilePath "ms-settings:windowsupdate-action" Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan
Start-Sleep -Seconds 1 # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Trigger Windows Update for detecting new updates
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
exit exit
} }
} }
{($_ -lt 19045) -or ($_ -gt 19048)} {($_ -lt 19045) -or ($_ -gt 19045)}
{ {
Write-Warning -Message $Localization.UnsupportedOSBuild Write-Warning -Message $Localization.UnsupportedOSBuild
@ -584,18 +577,14 @@ public static string GetString(uint strId)
# Enable receiving updates for other Microsoft products when you update Windows # Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1 # Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
# Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Check for updates # Check for updates
Start-Process -FilePath "ms-settings:windowsupdate-action" Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan
Start-Sleep -Seconds 1 # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Trigger Windows Update for detecting new updates
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
exit exit
} }

22
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -120,19 +120,12 @@ public static string GetString(uint strId)
# Enable receiving updates for other Microsoft products when you update Windows # Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1 # Check for updates
Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
# Check for updates
Start-Process -FilePath "ms-settings:windowsupdate-action"
Start-Sleep -Seconds 1
# Trigger Windows Update for detecting new updates
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
exit exit
} }
} }
@ -459,19 +452,12 @@ public static string GetString(uint strId)
# Enable receiving updates for other Microsoft products when you update Windows # Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1 # Check for updates
Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
# Check for updates
Start-Process -FilePath "ms-settings:windowsupdate-action"
Start-Sleep -Seconds 1
# Trigger Windows Update for detecting new updates
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
exit exit
} }

11
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -120,19 +120,12 @@ public static string GetString(uint strId)
# Enable receiving updates for other Microsoft products when you update Windows # Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1 # Check for updates
Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
# Check for updates
Start-Process -FilePath "ms-settings:windowsupdate-action"
Start-Sleep -Seconds 1
# Trigger Windows Update for detecting new updates
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
exit exit
} }
} }

29
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -205,26 +205,19 @@ public static string GetString(uint strId)
# Enable receiving updates for other Microsoft products when you update Windows # Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
# Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Check for updates # Check for updates
Start-Process -FilePath "ms-settings:windowsupdate-action" Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan
Start-Sleep -Seconds 1 # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Trigger Windows Update for detecting new updates
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
exit exit
} }
} }
{($_ -lt 19045) -or ($_ -gt 19048)} {($_ -lt 19045) -or ($_ -gt 19045)}
{ {
Write-Warning -Message $Localization.UnsupportedOSBuild Write-Warning -Message $Localization.UnsupportedOSBuild
@ -585,18 +578,14 @@ public static string GetString(uint strId)
# Enable receiving updates for other Microsoft products when you update Windows # Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1 # Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
# Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Check for updates # Check for updates
Start-Process -FilePath "ms-settings:windowsupdate-action" Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan
Start-Sleep -Seconds 1 # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Trigger Windows Update for detecting new updates
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
exit exit
} }

282
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -246,6 +246,8 @@ public static string GetString(uint strId)
Invoke-WebRequest @Parameters Invoke-WebRequest @Parameters
Start-Process -FilePath "$DownloadsFolder\Windows11InstallationAssistant.exe" -ArgumentList "/SkipEULA" Start-Process -FilePath "$DownloadsFolder\Windows11InstallationAssistant.exe" -ArgumentList "/SkipEULA"
exit
} }
catch [System.Net.WebException] catch [System.Net.WebException]
{ {
@ -270,21 +272,14 @@ public static string GetString(uint strId)
# Enable receiving updates for other Microsoft products when you update Windows # Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
# Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Check for updates # Check for updates
Start-Process -FilePath "ms-settings:windowsupdate-action" Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan
Start-Sleep -Seconds 1
# Trigger Windows Update for detecting new updates # Open the "Windows Update" page
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() Start-Process -FilePath "ms-settings:windowsupdate"
exit exit
} }
@ -305,21 +300,14 @@ public static string GetString(uint strId)
# Enable receiving updates for other Microsoft products when you update Windows # Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
# Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Check for updates # Check for updates
Start-Process -FilePath "ms-settings:windowsupdate-action" Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan
Start-Sleep -Seconds 1 # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Trigger Windows Update for detecting new updates
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
exit exit
} }
@ -648,18 +636,14 @@ public static string GetString(uint strId)
# Enable receiving updates for other Microsoft products when you update Windows # Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1 # Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
# Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Check for updates # Check for updates
Start-Process -FilePath "ms-settings:windowsupdate-action" Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan
Start-Sleep -Seconds 1 # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Trigger Windows Update for detecting new updates
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
exit exit
} }
@ -3300,6 +3284,65 @@ function TaskbarSearch
} }
} }
<#
.SYNOPSIS
Copilot button on the taskbar
.PARAMETER Hide
Hide Copilot button on the taskbar
.PARAMETER Show
Show Copilot button on the taskbar
.EXAMPLE
CopilotButton -Hide
.EXAMPLE
CopilotButton -Show
.NOTES
Current user
#>
function CopilotButton
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Hide"
)]
[switch]
$Hide,
[Parameter(
Mandatory = $true,
ParameterSetName = "Show"
)]
[switch]
$Show
)
switch ((Get-CimInstance -ClassName CIM_OperatingSystem).BuildNumber)
{
{($_ -ne 22631) -and ($_ -lt 23493)}
{
return
}
}
switch ($PSCmdlet.ParameterSetName)
{
"Hide"
{
New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name ShowCopilotButton -PropertyType DWord -Value 0 -Force
}
"Show"
{
New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name ShowCopilotButton -PropertyType DWord -Value 1 -Force
}
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Task view button on the taskbar Task view button on the taskbar
@ -3477,6 +3520,74 @@ function SecondsInSystemClock
} }
} }
<#
.SYNOPSIS
Combine taskbar buttons and hide labels
.PARAMETER Always
Combine taskbar buttons and always hide labels
.PARAMETER Full
Combine taskbar buttons and hide labels when taskbar is full
.PARAMETER Never
Combine taskbar buttons and never hide labels
.EXAMPLE
TaskbarCombine -Always
.EXAMPLE
TaskbarCombine -Full
.EXAMPLE
TaskbarCombine -Never
.NOTES
Current user
#>
function TaskbarCombine
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Always"
)]
[switch]
$Always,
[Parameter(
Mandatory = $true,
ParameterSetName = "Full"
)]
[switch]
$Full,
[Parameter(
Mandatory = $true,
ParameterSetName = "Never"
)]
[switch]
$Never
)
switch ($PSCmdlet.ParameterSetName)
{
"Always"
{
New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name taskbarGlomLevel -PropertyType DWord -Value 0 -Force
}
"Full"
{
New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name taskbarGlomLevel -PropertyType DWord -Value 1 -Force
}
"Never"
{
New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name taskbarGlomLevel -PropertyType DWord -Value 1 -Force
}
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Unpin shortcuts from the taskbar Unpin shortcuts from the taskbar
@ -13677,6 +13788,9 @@ function WindowsSandbox
.EXAMPLE .EXAMPLE
DNSoverHTTPS -Enable -PrimaryDNS 1.0.0.1 -SecondaryDNS 1.1.1.1 DNSoverHTTPS -Enable -PrimaryDNS 1.0.0.1 -SecondaryDNS 1.1.1.1
.EXAMPLE Enable DNS-over-HTTPS via Comss.one DNS server. Applicable for Russia only
DNSoverHTTPS -ComssOneDNS
.EXAMPLE .EXAMPLE
DNSoverHTTPS -Disable DNSoverHTTPS -Disable
@ -13686,6 +13800,9 @@ function WindowsSandbox
.LINK .LINK
https://docs.microsoft.com/en-us/windows-server/networking/dns/doh-client-support https://docs.microsoft.com/en-us/windows-server/networking/dns/doh-client-support
.LINK
https://www.comss.ru/page.php?id=7315
.NOTES .NOTES
Machine-wide Machine-wide
#> #>
@ -13719,6 +13836,14 @@ function DNSoverHTTPS
[string] [string]
$SecondaryDNS, $SecondaryDNS,
# https://www.comss.ru/page.php?id=7315
[Parameter(
Mandatory = $true,
ParameterSetName = "ComssOneDNS"
)]
[switch]
$ComssOneDNS,
[Parameter( [Parameter(
Mandatory = $true, Mandatory = $true,
ParameterSetName = "Disable" ParameterSetName = "Disable"
@ -13727,6 +13852,11 @@ function DNSoverHTTPS
$Disable $Disable
) )
if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain)
{
return
}
# Determining whether Hyper-V is enabled # Determining whether Hyper-V is enabled
# After enabling Hyper-V feature a virtual switch breing created, so we need to use different method to isolate the proper adapter # After enabling Hyper-V feature a virtual switch breing created, so we need to use different method to isolate the proper adapter
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent) if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent)
@ -13742,54 +13872,80 @@ function DNSoverHTTPS
{ {
"Enable" "Enable"
{ {
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain) if (((Get-WinHomeLocation).GeoId -ne "203") -or ((Get-WinHomeLocation).GeoId -ne "29"))
{
return
}
# Set a primary and secondary DNS servers
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent)
{
Get-NetAdapter -Physical | Get-NetIPInterface -AddressFamily IPv4 | Set-DnsClientServerAddress -ServerAddresses $PrimaryDNS, $SecondaryDNS
}
else
{ {
# Set a primary and secondary DNS servers Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq "0.0.0.0/0"} | Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses $PrimaryDNS, $SecondaryDNS
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent) }
foreach ($InterfaceGuid in $InterfaceGuids)
{
if (-not (Test-Path -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS"))
{ {
Get-NetAdapter -Physical | Get-NetIPInterface -AddressFamily IPv4 | Set-DnsClientServerAddress -ServerAddresses $PrimaryDNS, $SecondaryDNS New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS" -Force
} }
else if (-not (Test-Path -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$SecondaryDNS"))
{ {
Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq "0.0.0.0/0"} | Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses $PrimaryDNS, $SecondaryDNS New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$SecondaryDNS" -Force
} }
# Encrypted preffered, unencrypted allowed
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS" -Name DohFlags -PropertyType QWord -Value 5 -Force
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$SecondaryDNS" -Name DohFlags -PropertyType QWord -Value 5 -Force
}
}
"ComssOneDNS"
{
if (-not (((Get-WinHomeLocation).GeoId -eq "203") -or ((Get-WinHomeLocation).GeoId -eq "29")))
{
return
}
foreach ($InterfaceGuid in $InterfaceGuids) # Set a primary and secondary DNS servers
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent)
{
Get-NetAdapter -Physical | Get-NetIPInterface -AddressFamily IPv4 | Set-DnsClientServerAddress -ServerAddresses 92.223.65.71
}
else
{
Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq "0.0.0.0/0"} | Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses 92.223.65.71
}
foreach ($InterfaceGuid in $InterfaceGuids)
{
if (-not (Test-Path -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\92.223.65.71"))
{ {
if (-not (Test-Path -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS")) New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\92.223.65.71" -Force
{
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS" -Force
}
if (-not (Test-Path -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$SecondaryDNS"))
{
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$SecondaryDNS" -Force
}
# Encrypted preffered, unencrypted allowed
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS" -Name DohFlags -PropertyType QWord -Value 5 -Force
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$SecondaryDNS" -Name DohFlags -PropertyType QWord -Value 5 -Force
} }
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\92.223.65.71" -Name DohFlags -PropertyType QWord -Value 2 -Force
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\92.223.65.71" -Name DohTemplate -PropertyType String -Value https://dns.comss.one/dns-query -Force
} }
} }
"Disable" "Disable"
{ {
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain) # Determining whether Hyper-V is enabled
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent)
{ {
# Determining whether Hyper-V is enabled # Configure DNS servers automatically
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent) Get-NetAdapter -Physical | Get-NetIPInterface -AddressFamily IPv4 | Set-DnsClientServerAddress -ResetServerAddresses
{ }
# Configure DNS servers automatically else
Get-NetAdapter -Physical | Get-NetIPInterface -AddressFamily IPv4 | Set-DnsClientServerAddress -ResetServerAddresses {
} # Configure DNS servers automatically
else Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq "0.0.0.0/0"} | Get-NetAdapter | Set-DnsClientServerAddress -ResetServerAddresses
{ }
# Configure DNS servers automatically
Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq "0.0.0.0/0"} | Get-NetAdapter | Set-DnsClientServerAddress -ResetServerAddresses
}
foreach ($InterfaceGuid in $InterfaceGuids) foreach ($InterfaceGuid in $InterfaceGuids)
{ {
Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh" -Recurse -Force -ErrorAction Ignore Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh" -Recurse -Force -ErrorAction Ignore
}
} }
} }
} }

20
src/Sophia_Script_for_Windows_11/Sophia.ps1

@ -389,6 +389,14 @@ TaskbarSearch -Hide
# Показать поле поиска на панели задач (значение по умолчанию) # Показать поле поиска на панели задач (значение по умолчанию)
# TaskbarSearch -SearchBox # TaskbarSearch -SearchBox
# Hide Copilot button on the taskbar
# Скрыть кнопку Copilot с панели задач
CopilotButton -Hide
# Show Copilot button on the taskbar (default value)
# Отобразить кнопку Copilot на панели задач (значение по умолчанию)
# CopilotButton -Show
# Hide the Task view button from the taskbar # Hide the Task view button from the taskbar
# Скрыть кнопку "Представление задач" с панели задач # Скрыть кнопку "Представление задач" с панели задач
TaskViewButton -Hide TaskViewButton -Hide
@ -413,6 +421,18 @@ SecondsInSystemClock -Show
# Скрыть секунды на часах на панели задач (значение по умолчанию) # Скрыть секунды на часах на панели задач (значение по умолчанию)
# SecondsInSystemClock -Hide # SecondsInSystemClock -Hide
# Combine taskbar buttons and always hide labels (default value)
# Объединить кнопки панели задач и всегда скрывать метки (значение по умолчанию)
TaskbarCombine -Always
# Combine taskbar buttons and hide labels when taskbar is full
# Объединить кнопки панели задач и скрывать метки при переполнении панели задач
# TaskbarCombine -Full
# Combine taskbar buttons and never hide labels
# Объединить кнопки панели задач и никогда не скрывать метки
# TaskbarCombine -Never
# Unpin the "Microsoft Edge", "Microsoft Store" shortcuts from the taskbar # Unpin the "Microsoft Edge", "Microsoft Store" shortcuts from the taskbar
# Открепить ярлыки "Microsoft Edge", "Microsoft Store" от панели задач # Открепить ярлыки "Microsoft Edge", "Microsoft Store" от панели задач
UnpinTaskbarShortcuts -Shortcuts Edge, Store UnpinTaskbarShortcuts -Shortcuts Edge, Store

282
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -242,6 +242,8 @@ public static string GetString(uint strId)
Invoke-WebRequest @Parameters Invoke-WebRequest @Parameters
Start-Process -FilePath "$DownloadsFolder\Windows11InstallationAssistant.exe" -ArgumentList "/SkipEULA" Start-Process -FilePath "$DownloadsFolder\Windows11InstallationAssistant.exe" -ArgumentList "/SkipEULA"
exit
} }
catch [System.Net.WebException] catch [System.Net.WebException]
{ {
@ -266,21 +268,14 @@ public static string GetString(uint strId)
# Enable receiving updates for other Microsoft products when you update Windows # Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
# Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Check for updates # Check for updates
Start-Process -FilePath "ms-settings:windowsupdate-action" Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan
Start-Sleep -Seconds 1
# Trigger Windows Update for detecting new updates # Open the "Windows Update" page
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() Start-Process -FilePath "ms-settings:windowsupdate"
exit exit
} }
@ -301,21 +296,14 @@ public static string GetString(uint strId)
# Enable receiving updates for other Microsoft products when you update Windows # Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
# Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Check for updates # Check for updates
Start-Process -FilePath "ms-settings:windowsupdate-action" Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan
Start-Sleep -Seconds 1 # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Trigger Windows Update for detecting new updates
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
exit exit
} }
@ -649,18 +637,14 @@ public static string GetString(uint strId)
# Enable receiving updates for other Microsoft products when you update Windows # Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1 # Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
# Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Check for updates # Check for updates
Start-Process -FilePath "ms-settings:windowsupdate-action" Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan
Start-Sleep -Seconds 1 # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate"
# Trigger Windows Update for detecting new updates
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
exit exit
} }
@ -3301,6 +3285,65 @@ function TaskbarSearch
} }
} }
<#
.SYNOPSIS
Copilot button on the taskbar
.PARAMETER Hide
Hide Copilot button on the taskbar
.PARAMETER Show
Show Copilot button on the taskbar
.EXAMPLE
CopilotButton -Hide
.EXAMPLE
CopilotButton -Show
.NOTES
Current user
#>
function CopilotButton
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Hide"
)]
[switch]
$Hide,
[Parameter(
Mandatory = $true,
ParameterSetName = "Show"
)]
[switch]
$Show
)
switch ((Get-CimInstance -ClassName CIM_OperatingSystem).BuildNumber)
{
{($_ -ne 22631) -and ($_ -lt 23493)}
{
return
}
}
switch ($PSCmdlet.ParameterSetName)
{
"Hide"
{
New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name ShowCopilotButton -PropertyType DWord -Value 0 -Force
}
"Show"
{
New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name ShowCopilotButton -PropertyType DWord -Value 1 -Force
}
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Task view button on the taskbar Task view button on the taskbar
@ -3478,6 +3521,74 @@ function SecondsInSystemClock
} }
} }
<#
.SYNOPSIS
Combine taskbar buttons and hide labels
.PARAMETER Always
Combine taskbar buttons and always hide labels
.PARAMETER Full
Combine taskbar buttons and hide labels when taskbar is full
.PARAMETER Never
Combine taskbar buttons and never hide labels
.EXAMPLE
TaskbarCombine -Always
.EXAMPLE
TaskbarCombine -Full
.EXAMPLE
TaskbarCombine -Never
.NOTES
Current user
#>
function TaskbarCombine
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Always"
)]
[switch]
$Always,
[Parameter(
Mandatory = $true,
ParameterSetName = "Full"
)]
[switch]
$Full,
[Parameter(
Mandatory = $true,
ParameterSetName = "Never"
)]
[switch]
$Never
)
switch ($PSCmdlet.ParameterSetName)
{
"Always"
{
New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name taskbarGlomLevel -PropertyType DWord -Value 0 -Force
}
"Full"
{
New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name taskbarGlomLevel -PropertyType DWord -Value 1 -Force
}
"Never"
{
New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name taskbarGlomLevel -PropertyType DWord -Value 1 -Force
}
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Unpin shortcuts from the taskbar Unpin shortcuts from the taskbar
@ -13698,6 +13809,9 @@ function WindowsSandbox
.EXAMPLE .EXAMPLE
DNSoverHTTPS -Enable -PrimaryDNS 1.0.0.1 -SecondaryDNS 1.1.1.1 DNSoverHTTPS -Enable -PrimaryDNS 1.0.0.1 -SecondaryDNS 1.1.1.1
.EXAMPLE Enable DNS-over-HTTPS via Comss.one DNS server. Applicable for Russia only
DNSoverHTTPS -ComssOneDNS
.EXAMPLE .EXAMPLE
DNSoverHTTPS -Disable DNSoverHTTPS -Disable
@ -13707,6 +13821,9 @@ function WindowsSandbox
.LINK .LINK
https://docs.microsoft.com/en-us/windows-server/networking/dns/doh-client-support https://docs.microsoft.com/en-us/windows-server/networking/dns/doh-client-support
.LINK
https://www.comss.ru/page.php?id=7315
.NOTES .NOTES
Machine-wide Machine-wide
#> #>
@ -13740,6 +13857,14 @@ function DNSoverHTTPS
[string] [string]
$SecondaryDNS, $SecondaryDNS,
# https://www.comss.ru/page.php?id=7315
[Parameter(
Mandatory = $true,
ParameterSetName = "ComssOneDNS"
)]
[switch]
$ComssOneDNS,
[Parameter( [Parameter(
Mandatory = $true, Mandatory = $true,
ParameterSetName = "Disable" ParameterSetName = "Disable"
@ -13748,6 +13873,11 @@ function DNSoverHTTPS
$Disable $Disable
) )
if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain)
{
return
}
# Determining whether Hyper-V is enabled # Determining whether Hyper-V is enabled
# After enabling Hyper-V feature a virtual switch breing created, so we need to use different method to isolate the proper adapter # After enabling Hyper-V feature a virtual switch breing created, so we need to use different method to isolate the proper adapter
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent) if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent)
@ -13763,54 +13893,80 @@ function DNSoverHTTPS
{ {
"Enable" "Enable"
{ {
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain) if (((Get-WinHomeLocation).GeoId -ne "203") -or ((Get-WinHomeLocation).GeoId -ne "29"))
{
return
}
# Set a primary and secondary DNS servers
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent)
{
Get-NetAdapter -Physical | Get-NetIPInterface -AddressFamily IPv4 | Set-DnsClientServerAddress -ServerAddresses $PrimaryDNS, $SecondaryDNS
}
else
{ {
# Set a primary and secondary DNS servers Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq "0.0.0.0/0"} | Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses $PrimaryDNS, $SecondaryDNS
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent) }
foreach ($InterfaceGuid in $InterfaceGuids)
{
if (-not (Test-Path -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS"))
{ {
Get-NetAdapter -Physical | Get-NetIPInterface -AddressFamily IPv4 | Set-DnsClientServerAddress -ServerAddresses $PrimaryDNS, $SecondaryDNS New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS" -Force
} }
else if (-not (Test-Path -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$SecondaryDNS"))
{ {
Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq "0.0.0.0/0"} | Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses $PrimaryDNS, $SecondaryDNS New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$SecondaryDNS" -Force
} }
# Encrypted preffered, unencrypted allowed
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS" -Name DohFlags -PropertyType QWord -Value 5 -Force
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$SecondaryDNS" -Name DohFlags -PropertyType QWord -Value 5 -Force
}
}
"ComssOneDNS"
{
if (-not (((Get-WinHomeLocation).GeoId -eq "203") -or ((Get-WinHomeLocation).GeoId -eq "29")))
{
return
}
foreach ($InterfaceGuid in $InterfaceGuids) # Set a primary and secondary DNS servers
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent)
{
Get-NetAdapter -Physical | Get-NetIPInterface -AddressFamily IPv4 | Set-DnsClientServerAddress -ServerAddresses 92.223.65.71
}
else
{
Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq "0.0.0.0/0"} | Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses 92.223.65.71
}
foreach ($InterfaceGuid in $InterfaceGuids)
{
if (-not (Test-Path -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\92.223.65.71"))
{ {
if (-not (Test-Path -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS")) New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\92.223.65.71" -Force
{
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS" -Force
}
if (-not (Test-Path -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$SecondaryDNS"))
{
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$SecondaryDNS" -Force
}
# Encrypted preffered, unencrypted allowed
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS" -Name DohFlags -PropertyType QWord -Value 5 -Force
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$SecondaryDNS" -Name DohFlags -PropertyType QWord -Value 5 -Force
} }
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\92.223.65.71" -Name DohFlags -PropertyType QWord -Value 2 -Force
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\92.223.65.71" -Name DohTemplate -PropertyType String -Value https://dns.comss.one/dns-query -Force
} }
} }
"Disable" "Disable"
{ {
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain) # Determining whether Hyper-V is enabled
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent)
{ {
# Determining whether Hyper-V is enabled # Configure DNS servers automatically
if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent) Get-NetAdapter -Physical | Get-NetIPInterface -AddressFamily IPv4 | Set-DnsClientServerAddress -ResetServerAddresses
{ }
# Configure DNS servers automatically else
Get-NetAdapter -Physical | Get-NetIPInterface -AddressFamily IPv4 | Set-DnsClientServerAddress -ResetServerAddresses {
} # Configure DNS servers automatically
else Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq "0.0.0.0/0"} | Get-NetAdapter | Set-DnsClientServerAddress -ResetServerAddresses
{ }
# Configure DNS servers automatically
Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq "0.0.0.0/0"} | Get-NetAdapter | Set-DnsClientServerAddress -ResetServerAddresses
}
foreach ($InterfaceGuid in $InterfaceGuids) foreach ($InterfaceGuid in $InterfaceGuids)
{ {
Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh" -Recurse -Force -ErrorAction Ignore Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh" -Recurse -Force -ErrorAction Ignore
}
} }
} }
} }

20
src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

@ -398,6 +398,14 @@ TaskbarSearch -Hide
# Показать поле поиска на панели задач (значение по умолчанию) # Показать поле поиска на панели задач (значение по умолчанию)
# TaskbarSearch -SearchBox # TaskbarSearch -SearchBox
# Hide Copilot button on the taskbar
# Скрыть кнопку Copilot с панели задач
CopilotButton -Hide
# Show Copilot button on the taskbar (default value)
# Отобразить кнопку Copilot на панели задач (значение по умолчанию)
# CopilotButton -Show
# Hide the Task view button from the taskbar # Hide the Task view button from the taskbar
# Скрыть кнопку "Представление задач" с панели задач # Скрыть кнопку "Представление задач" с панели задач
TaskViewButton -Hide TaskViewButton -Hide
@ -422,6 +430,18 @@ SecondsInSystemClock -Show
# Скрыть секунды на часах на панели задач (значение по умолчанию) # Скрыть секунды на часах на панели задач (значение по умолчанию)
# SecondsInSystemClock -Hide # SecondsInSystemClock -Hide
# Combine taskbar buttons and always hide labels (default value)
# Объединить кнопки панели задач и всегда скрывать метки (значение по умолчанию)
TaskbarCombine -Always
# Combine taskbar buttons and hide labels when taskbar is full
# Объединить кнопки панели задач и скрывать метки при переполнении панели задач
# TaskbarCombine -Full
# Combine taskbar buttons and never hide labels
# Объединить кнопки панели задач и никогда не скрывать метки
# TaskbarCombine -Never
# Unpin the "Microsoft Edge", "Microsoft Store" shortcuts from the taskbar # Unpin the "Microsoft Edge", "Microsoft Store" shortcuts from the taskbar
# Открепить ярлыки "Microsoft Edge", "Microsoft Store" от панели задач # Открепить ярлыки "Microsoft Edge", "Microsoft Store" от панели задач
UnpinTaskbarShortcuts -Shortcuts Edge, Store UnpinTaskbarShortcuts -Shortcuts Edge, Store

Loading…
Cancel
Save