View Single Post
Old 04-15-2008   #2 (permalink)
RichS [MVP]
Guest


 

RE: Executing PS1 files by double clicking on them

By default ps1 files are not executable by double clicking. This is designed
to prevent some of the issues seen with VBScript code that can be run by
malware.

If you want to make the scripts accessible to running manually without
access to the PowerShell prompt why not look at using PowerGUI

--
Richard Siddaway
All scripts are supplied "as is" and with no warranty
PowerShell MVP
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk


"greatbarrier86" wrote:
Quote:

> I need some advice. Occasionally, some of my scripts are run by the
> technician manually and are not automatically invoked. In the case of
> powershell files, i am using either a VBS file or a BAT file to invoke the
> PS1 file because PS1s are designed to open with notepad by default. Can
> anyone offer me some advice as to a way that would allow the tech to just
> execute the PS1 file by clicking on it?