Skip to content

Bug powershell profile not load on 26 h2 - #200

Merged
Magnetarman merged 2 commits into
Devfrom
BUG-powershell-profile-not-load-on-26H2
Oct 23, 2026
Merged

Magnetarman merged 2 commits into
Devfrom
BUG-powershell-profile-not-load-on-26H2

Conversation

@Magnetarman

Copy link
Copy Markdown
Owner

Description

Fixes the PowerShell profile loading error (Microsoft.PowerShell_profile.ps1) on new PCs: the file downloaded from GitHub carries the Zone.Identifier stream (ZoneId=3, Internet) and, under the RemoteSigned execution policy, cannot run because it is not digitally signed.

Unblock-File is now executed immediately after Install-RemoteFile writes the profile into Documents\PowerShell, during the Install-PspEnvironment step. This way, on every new PC the profile installed by start-core.ps1 is unblocked before its first load and no longer blocks terminal startup.

Fixes #


Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactoring (no functional change)
  • 🧹 Cleanup / Maintenance
  • 📖 Documentation

Files Modified

  • start-modules/60-Module.PspEnvironment.ps1 — added Unblock-File on the installed profile in Install-PspEnvironment, after Install-RemoteFile
  • start-core.ps1 — change reverted (generated file, must not be edited manually)

Tests & Verification

  • Verified locally with pwsh (with and without -NoProfile): profile loads and exits with code 0
  • If CI/CD changed, validated the affected workflow/action and updated the tracking document
  • Execution logs attached (snippet below)
Log / Screenshot
Stream      Length
------      ------
:$DATA      74451
Zone.Identifier removed from C:\Users\User\Documents\PowerShell\Microsoft.PowerShell_profile.ps1

pwsh → ✅ Profile loaded - Version: 2.6.0.8
exit:0

Module syntax verified with the PowerShell parser: OK.


Checklist

Missing a checkbox or violating a rule will result in automatic PR rejection.

  • PR targets Dev unless this is an authorized maintainer release change
  • Atomic change: one issue or one feature per PR
  • WinToolkit.ps1 not modified manually (handled by CI automation)
  • Generated artifacts (WinToolkit.ps1, start-core.ps1) are not edited manually
  • Changes to .github/, start.ps1 or start-modules/ include the required maintainer review
  • Existing code style respected, no debug code left behind
  • Clear commits in English, max 72 characters per line

@Magnetarman
Magnetarman merged commit ca43c5e into Dev Oct 23, 2026
8 checks passed
@Magnetarman
Magnetarman deleted the BUG-powershell-profile-not-load-on-26H2 branch October 23, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant