If you sign your PowerShell scripts and run them under an AllSigned policy or App Control, the November 2026 Windows update may have quietly broken some of them. Scripts that ran fine for years now show their signature as NotSigned, even though nobody touched the file. Logon scripts, scheduled tasks and Intune remediation scripts are where people notice first, because they fail with nobody watching.
The cause is a deliberate security change in KB5132061, not a bug, so uninstalling the update is the wrong fix. In this post I'll show how to find the affected scripts, how to use Microsoft's repair script to get them running again today, and how to fix them properly so the next update doesn't catch you.
Quick answer
The November 10, 2026 update KB5132061 added stricter encoding checks to PowerShell script signing. Signed scripts with invalid UTF-8, or text the system code page can't read, now fail signature validation and show NotSigned. Find them with Get-AuthenticodeSignature, then run Microsoft's Repair-SignedPowerShellUtf8.ps1 (KB5136213). Its Repair mode is a temporary fix that keeps the old signature; the real fix is ConvertToUtf8Bom: save the script as UTF-8 with BOM and sign it again. Don't uninstall the update.
What changed in KB5132061
The KB5132061 release notes for Windows 11 24H2, 25H2 and 26H2 include this line under Windows PowerShell: the update "strengthens security for PowerShell script signing and signature verification by introducing stricter encoding validation." Scripts containing invalid UTF-8 "might fail signature validation, even if they were previously accepted."
In other words, Windows used to be forgiving about how a signed script's bytes were turned into text before checking the hash. That forgiveness is a weak spot: if two machines read the same bytes as different text, the code that runs might not be the code that was signed. Microsoft closed it, and files with sloppy encoding got caught.
The files that usually get caught are:
- Scripts saved as UTF-8 without a BOM that contain accented letters, Nepali Devanagari text, or curly quotes pasted from Word or Teams.
- Scripts with a stray invalid byte, often from copy-pasting between editors with different encodings.
- Scripts written in a local code page (Shift-JIS is Microsoft's example) that Windows now reads as UTF-8.
Plain ASCII scripts are fine. If your script has only English letters, numbers and normal quotes, this change won't touch it.
Step 1: Find the scripts whose signature broke
Run this on a patched machine against your script folder or share. It lists every script that isn't Valid:
Get-ChildItem -Path C:\Scripts -Recurse -Include *.ps1,*.psm1,*.psd1 |
Get-AuthenticodeSignature |
Where-Object Status -ne 'Valid' |
Select-Object Path, Status, StatusMessage |
Format-Table -AutoSize
Expect some genuinely unsigned scripts in that list too. The ones to worry about are files you know were signed and now report NotSigned or HashMismatch.
Step 2: Get Microsoft's repair script
Microsoft published a sample tool, Repair-SignedPowerShellUtf8.ps1, on the KB5136213 support page. Copy the full script from that page and save it under that name. A few rules from Microsoft before you run it:
- Use Windows PowerShell 5.1 in a FullLanguage session.
- Don't disable your execution policy or App Control to run it. On locked-down machines, sign the repair script with your own trusted code signing certificate first.
- It never overwrites the source file. Every mode writes a new copy next to it.
Step 3: Scan to see what kind of problem each file has
Scan is the default mode and it's read-only:
.\Repair-SignedPowerShellUtf8.ps1 -Path C:\Scripts -Recurse
Each file gets one of these results:
| Result | What it means | Can Repair mode help? |
|---|---|---|
| None | No encoding issue found | Not needed |
| MalformedUtf8 | UTF-8 file with invalid bytes | Sometimes |
| Utf8WithoutBom | UTF-8 without BOM that isn't valid in this machine's code page | Yes, on a machine with the signer's code page |
| NotValidInCodePage | Not valid text in this machine's code page | Yes, on a machine with the signer's code page |
| CodePageTextReadAsUtf8 | Code-page text Windows now reads as UTF-8 | No, convert instead |
Step 4: Temporary fix that keeps the old signature
If you don't have the signing key to hand (a vendor's script, say), try Repair mode. It writes a copy with the same signed text in an encoding Windows now accepts, then checks whether the old signature is valid on that copy:
.\Repair-SignedPowerShellUtf8.ps1 -Mode Repair -Path C:\Scripts\Deploy.ps1
Get-AuthenticodeSignature C:\Scripts\Deploy.repaired.ps1 | Select-Object Status
Only deploy the repaired copy if the status is Valid and you've tested it. Microsoft is clear that repair isn't guaranteed. Characters that were already unreadable stay unreadable, so check that any messages or paths with special characters still look right. If repair fails and you can't re-sign the file yourself, ask the publisher for a corrected, signed copy.
Step 5: The proper fix, convert to UTF-8 with BOM and re-sign
For your own scripts, do it properly once. ConvertToUtf8Bom writes a clean UTF-8 with BOM copy and strips the old signature:
.\Repair-SignedPowerShellUtf8.ps1 -Mode ConvertToUtf8Bom -Path C:\Scripts\Deploy.ps1
Open Deploy.utf8bom.ps1, read it through, then sign it with your normal code signing certificate:
$cert = Get-ChildItem Cert:\CurrentUser\My -CodeSigningCert | Select-Object -First 1
Set-AuthenticodeSignature -FilePath C:\Scripts\Deploy.utf8bom.ps1 `
-Certificate $cert -TimestampServer 'http://timestamp.digicert.com'
Get-AuthenticodeSignature C:\Scripts\Deploy.utf8bom.ps1 | Select-Object Status
Use the timestamp server your organisation normally uses. Timestamping matters: without it, the signature stops validating when the certificate expires. When the status shows Valid, rename the file back to its original name and redeploy.
If the scan said CodePageTextReadAsUtf8 and the tool can't detect the code page, pass it yourself, for example -SourceCodePage 932 for Japanese Shift-JIS.
Stop it happening again
The habit to build is simple: save signed scripts as UTF-8 with BOM, every time.
- In VS Code, click the encoding in the status bar, choose Save with Encoding, then UTF-8 with BOM. You can make it the default for PowerShell files with
"[powershell]": { "files.encoding": "utf8bom" }in settings. - In Windows PowerShell 5.1,
Set-Content -Encoding UTF8writes UTF-8 with a BOM. In PowerShell 7 you have to ask for it:-Encoding utf8BOM. - Add the Step 1 check to your signing pipeline so a bad file fails before it reaches users.
What not to do
Don't uninstall KB5132061. It's the November security update and carries a lot more than this change, including the start of the NTLM signing rollout and this month's security fixes. Don't switch execution policy to Bypass across the fleet either. That fixes the symptom by removing the protection you were signing scripts for in the first place.
A few things I learned
- Encoding is part of the signature now. A file that looks identical in Notepad can still fail if its bytes are ambiguous.
- Repair is a bridge. Use it for vendor scripts while you wait for a fixed copy; re-sign your own.
- PowerShell 5.1 and 7 disagree about "UTF8". In 5.1 it means with BOM, in 7 it means without.
- Silent failures hurt most. Check scheduled tasks and logon scripts, where nobody sees the red text.
I wrote earlier about automating Windows admin tasks with PowerShell, and this month's Outlook zero-day post covers the rest of the November Patch Tuesday. If your team needs help cleaning up a script library or a signing setup, have a look at my Windows and Active Directory services.
Frequently asked questions
Why do my signed PowerShell scripts show NotSigned after the November 2026 update?
KB5132061 added stricter encoding checks to PowerShell script signing. If a signed script has invalid UTF-8 bytes, or text that isn't valid in the machine's code page, Windows no longer accepts the signature and reports NotSigned. Saving the script as UTF-8 with BOM and signing it again fixes it.
What is Repair-SignedPowerShellUtf8.ps1?
It is a sample script Microsoft published in KB5136213. It scans PowerShell files for encoding problems, can try a temporary repair that keeps the existing signature, or can create a UTF-8 with BOM copy for re-signing. It runs in Windows PowerShell 5.1 and never overwrites the original file.
Should I uninstall KB5132061 to fix PowerShell script signing errors?
No. KB5132061 is the November 2026 security update and includes many security fixes. Removing it leaves the machine exposed. Fix the affected scripts instead, either with Microsoft's repair script as a short-term step or by converting them to UTF-8 with BOM and signing them again.
How do I save a PowerShell script as UTF-8 with BOM?
In VS Code, click the encoding in the status bar, choose Save with Encoding and pick UTF-8 with BOM. In Windows PowerShell 5.1, Set-Content -Encoding UTF8 writes a BOM. In PowerShell 7, use -Encoding utf8BOM, because plain UTF8 there means no BOM.
Which scripts are affected by the PowerShell signing change?
Signed scripts whose text isn't plain ASCII and whose encoding is ambiguous: UTF-8 without BOM containing accented or non-Latin characters, files with stray invalid bytes, and scripts saved in a local code page such as Shift-JIS. Unsigned scripts and plain ASCII signed scripts are not affected.
