CMD>
C:> powershell -File "C:abbixhello.ps1"
PS>
cd "C:abbix";
echo 'Write-host "Please enter your name:"' > hello.ps1
echo '$userName = read-host' >> hello.ps1
echo '"Hello $userName!"' >> hello.ps1
type hello.ps1
./hello.ps1
For Error: cannot be loaded because the execution of scripts is disabled on this system, Use:
PS> set-executionpolicy remotesigned
./myscript.ps1 //if is in the current directory
c:/scripts/myscript.ps1 //if you want to use the full path
&"C:/my path with space/myscript.ps1" //if your path has spaces
# Run PowerShell as administrator and run the following command
set-executionpolicy remotesigned