When I use Notepads to edit the Powershell profile (Microsoft.PowerShell_profile.ps1), and the next time I open Powershell, it prints "not digitally signed". If I use notepad3 to edit it. It does not have this problem.
.: File C:\Users\A\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded. The file C:\Users\A\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https://go.microsoft.com/fwlink/?LinkID=135170.
Screenshots
Desktop (please complete the following information):
OS: [Windows 10 20H2 19042.630]
Version [1.4.2.0]
other
Name Value
---- -----
PSVersion 7.1.0
PSEdition Core
GitCommitId 7.1.0
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Describe the bug
When I use Notepads to edit the Powershell profile (Microsoft.PowerShell_profile.ps1), and the next time I open Powershell, it prints "not digitally signed". If I use notepad3 to edit it. It does not have this problem.
Screenshots
Desktop (please complete the following information):
Additional context 英语不好,用中文说了,用notepads更改 powershell 的profile 会引发未签名问题, 我设置的应该是 本地PS脚本 和 下载的签名脚本 可以运行。用其他编辑器 vscode notepad3 等,更改这个文件都没有问题。大概是更改后,系统认为这是从网上下载的脚本