Skip to content

Simplify Set-WinUtilDNS.ps1#4663

Open
GabiNun2 wants to merge 6 commits into
ChrisTitusTech:mainfrom
GabiNun2:patch-7
Open

Simplify Set-WinUtilDNS.ps1#4663
GabiNun2 wants to merge 6 commits into
ChrisTitusTech:mainfrom
GabiNun2:patch-7

Conversation

@GabiNun2

@GabiNun2 GabiNun2 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Type of Change

  • New feature
  • Bug fix
  • Documentation update
  • UI/UX improvement

Description

@GabiNun2 GabiNun2 requested a review from ChrisTitusTech as a code owner June 8, 2026 13:42
@ChrisTitusTech ChrisTitusTech added the Refactor For cleaning up and refactoring code to be more efficient. label Jun 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors DNS application behavior during tweak execution by skipping DNS updates when the provider is “Default”, and simplifies the DNS setter implementation.

Changes:

  • Only call Set-WinUtilDNS when a non-Default provider is selected in the tweaks runspace.
  • Refactor Set-WinUtilDNS to iterate active adapters and apply DNS settings per adapter.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
functions/public/Invoke-WPFtweaksbutton.ps1 Gates DNS application so DNS changes are only attempted when a non-default provider is selected.
functions/private/Set-WinUtilDNS.ps1 Simplifies DNS-setting logic per “Up” adapter and consolidates how provider DNS values are applied.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread functions/private/Set-WinUtilDNS.ps1
Comment thread functions/public/Invoke-WPFtweaksbutton.ps1 Outdated
GabiNun2 and others added 2 commits June 22, 2026 12:35
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor For cleaning up and refactoring code to be more efficient.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants