+ CategoryInfo : NotSpecified: (:) [], PSSecurityException + FullyQualifiedErrorId : RuntimeException

时间:2023-03-09 06:30:55
+ CategoryInfo          : NotSpecified: (:) [], PSSecurityException     + FullyQualifiedErrorId : RuntimeException
File C:\Users\danv\Documents\WindowsPowerShell\profile.ps1 cannot be loaded because the
execution of scripts is disabled on this system. Please see "get-help about_signing" for
more details.
At line:1 char:2
+ . <<<< 'C:\Users\danv\Documents\WindowsPowerShell\profile.ps1'
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException

win+R

cmd

Set-ExecutionPolicy Unrestricted -Scope CurrentUser