Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

cmd run powershell script

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
Comment

powershell script run

./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
Comment

powershell script to run powershell script

# Run PowerShell as administrator and run the following command
set-executionpolicy remotesigned
Comment

PREVIOUS NEXT
Code Example
Shell :: how to connect my ubuntu server to ssh 
Shell :: To exclude directory with particluar pattern : 
Shell :: clear terminal mac 
Shell :: pyinstaller dmg on mac 
Shell :: pretty print csv ubuntu terminal 
Shell :: edit alias terminal 
Shell :: nginx on ubuntu 
Shell :: bash: telnet: commande inconnue. 
Shell :: how to kill recycling process linux 
Shell :: if you cannot update any of the repositry in ubuntu 
Shell :: how to install node version to current folder only 
Shell :: ubuntu cannot access settings 
Shell :: restart nginx windows 
Shell :: xcode errSecInternalComponent 
Shell :: /bin/grep: /sbin/init: No such file or directory 
Shell :: chocolatey cmd 
Shell :: python-minimal has no installation candidate 
Shell :: Unix and Linux System Commands 
Shell :: how to add geth to environment variables 
Shell :: install firefox redhat 7 
Shell :: qemu specify raw 
Shell :: how to install from a Linux terminal 
Shell :: How to list all unit files with systemctl command 
Shell :: How To Create Notification Using Batch Script 
Shell :: git, repository, new repository 
Shell :: ssh set owner recursive 
Shell :: bash script get value from piped input 
Shell :: install shutter for ubuntu screenshot 
Shell :: linux convert pdf trennen 
Shell :: connect different volumes docker container 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =