Issue:-
When PowerShell is first installed the default execution policy is “Restricted.” This means PowerShell will not run scripts or configuration files. Here is a list of policy levels:
First time when you
launch PowerShell and try to run any PowerShell scripts file, it will not run
and gives the below error. Here I am trying to run a simple ps script “directory.ps1”
with Get-Chitditem cmdlet inside it.
"File C:\ZAid\Testing\Script.ps1
cannot be loaded because the execution of scripts is disabled on this system. "
When PowerShell is first installed the default execution policy is “Restricted.” This means PowerShell will not run scripts or configuration files. Here is a list of policy levels:

