Skip to content

Feature: Migrate netsh to SMA.PowerShell.Create() & admin banner#3499

Merged
mergify[bot] merged 6 commits into
mainfrom
feature/network-interface-powershell
Jun 23, 2026
Merged

Feature: Migrate netsh to SMA.PowerShell.Create() & admin banner#3499
mergify[bot] merged 6 commits into
mainfrom
feature/network-interface-powershell

Conversation

@BornToBeRoot

Copy link
Copy Markdown
Owner

Changes proposed in this pull request

  • Align the design with the rest of the application
  • Use PowerShell.Create() instead of external powershell.exe
  • Include status message, admin banner

To-Do

Contributing

By submitting this pull request, I confirm the following:

Copilot AI review requested due to automatic review settings June 22, 2026 00:01
@github-actions github-actions Bot added this to the next-release milestone Jun 22, 2026
@mergify

mergify Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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 modernizes the Network Interface “Configure” workflow by moving configuration execution to an in-process PowerShell runspace (System.Management.Automation.PowerShell.Create()), aligning the UI with other admin-gated areas, and documenting the UX changes.

Changes:

  • Migrate network configuration actions from spawning powershell.exe to in-process SMA.PowerShell.Create() execution.
  • Add an admin-required banner (“Restart as Administrator”) and gate configuration commands behind IsAdmin.
  • Add status-bar success messages for configuration actions and update documentation/changelog accordingly.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Website/docs/changelog/next-release.md Documents the migration to in-process PowerShell, the new admin banner, status messages, and button relocation.
Website/docs/application/network-interface.md Updates user documentation: moves Flush/Release/Renew to Configure tab and explains admin requirement + banner.
Source/NETworkManager/Views/NetworkInterfaceView.xaml Moves Flush/Release/Renew controls to Configure tab and adds the non-admin banner UI.
Source/NETworkManager/ViewModels/NetworkInterfaceViewModel.cs Gates configuration commands on admin status and adds success/failure status messages for actions.
Source/NETworkManager.Utilities/PowerShellHelper.cs Removes external powershell.exe execution helper, keeping only PowerShell-safe escaping.
Source/NETworkManager.Models/Network/NetworkInterface.cs Implements in-process execution for netsh/ipconfig via a PowerShell runspace helper.
Source/NETworkManager.Localization/Resources/Strings.resx Adds new localized strings for success messages and the admin banner message.
Source/NETworkManager.Localization/Resources/Strings.Designer.cs Adds generated accessors for the new localization keys.
Files not reviewed (1)
  • Source/NETworkManager.Localization/Resources/Strings.Designer.cs: Generated file

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

Comment on lines +572 to +575
ps.Invoke();

private void OnUserHasCanceled()
{
UserHasCanceled?.Invoke(this, EventArgs.Empty);
if (checkExitCode && ps.HadErrors)
throw new Exception(string.Join("; ", ps.Streams.Error.Select(e => e.ToString())));
Comment thread Source/NETworkManager.Localization/Resources/Strings.Designer.cs
Comment thread Website/docs/changelog/next-release.md Outdated
BornToBeRoot and others added 3 commits June 22, 2026 02:12
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@mergify mergify Bot merged commit f1992dd into main Jun 23, 2026
5 checks passed
@mergify mergify Bot deleted the feature/network-interface-powershell branch June 23, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants