Check out example codes for "running scripts is disabled on this system". It will help you in understanding the concepts better.

Code Example 1

=>run powershell as administrator
=>run foll command
get-ExecutionPolicy
=>if restricted; run following command
set-ExecutionPolicy Unrestricted
=>and set to all
=>again check by foll. command
get-ExecutionPolicy
**it will get unrestricted and problem is solved**

Learn ReactJs, React Native from akashmittal.com