The default execution policy, Limited, prevents all scripts from running, including scripts that you write on the local computer.
The execution policy is stored in the registry, so you only need to change it once on each computer.
To change the execution policy, complete the following procedure:
Start Windows PowerShell with the option "Run as administrator".
At the command prompt, type:
Set-ExecutionPolicy AllSigned
-or -
Set-ExecutionPolicy RemoteSigned
This change is effective immediately.
To run the script, enter the full name and full path to the script file.
For example, to run the Get-ServiceLog.ps1 script in the C:\Scripts , type:
C:\Scripts\Get-ServiceLog.ps1
And for the Python file, you have two points. Try adding your Python folder to your PATH and the .py extension.
In PATHEXT from the go properties of a computer. Then click on advanced system protection. Then the environment variable. Here you will find two points.
Mustafa jahjoum
source share