![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Load / run .ps1 script on poweshell commandline (like CALL) I have a .ps1 file in the current folder, which I want to execute (inside powershell). How do I do that? (the same thin CALL does in a batch file) I feel totallystupid - I spent half an hour searching and reading for that with no result whatsoever. |
| | #3 (permalink) |
| Guest | Re: Load / run .ps1 script on poweshell commandline (like CALL) Andrew Webb wrote: > Are you typing interactively? Then do this:- > > ../myfile.ps1 <enter> > > Just typing myfile.ps1 <enter> won't work. > > Andrew Webb If the file is not signed then you will also need to make sure you execution policy allows it. Get-ExecutionPolicy will tell you what you are current set to. At the moment mine is set to RemoteSigned (Set-ExecutionPolicy RemoteSigned) because I have not got round to setting up a short cut to sign scripts. I have to admit the ./ and execution policy had me scratching my head a bit to begin with. RoB |
| | #4 (permalink) |
| Guest | Re: Load / run .ps1 script on poweshell commandline (like CALL) thanks fols, that helps a lot ![]() Rob Kenny wrote: > Andrew Webb wrote: > > Are you typing interactively? Then do this:- > > > > ../myfile.ps1 <enter> > > > > Just typing myfile.ps1 <enter> won't work. > > > > Andrew Webb > > If the file is not signed then you will also need to make sure you > execution policy allows it. > > Get-ExecutionPolicy will tell you what you are current set to. At the > moment mine is set to RemoteSigned (Set-ExecutionPolicy RemoteSigned) > because I have not got round to setting up a short cut to sign scripts. > > I have to admit the ./ and execution policy had me scratching my head a > bit to begin with. > > RoB |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [ann] another way to call api's from script (the PB way) | mr_unreliable | VB Script | 0 | 07-03-2008 12:28 PM |
| Howcome something works on the commandline but not when i put thesame commands in a script? | Gobba | PowerShell | 3 | 06-03-2008 07:48 AM |
| Re: Using a colon in a script to call another cmdlet | Keith Hill [MVP] | PowerShell | 0 | 04-29-2008 10:58 PM |
| function call from within powershell script | Anatoli | PowerShell | 2 | 08-08-2007 12:54 PM |
| Call Powershell script from ASP.NET page? | Tim | PowerShell | 1 | 05-23-2007 07:55 AM |