![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | File Extension Hello! Which File Extension is needed to execute a Powershell Script with a doubleclick? And which tools do you use, to write a powershell script? When i write a script with notepad, i get an error while executing: Error while loading windows powershell-Console File "(Path to script)": Invalid at the upper Layer of the document (translated by myself from german :-) ) my script starts with "start sleep 5", and this syntax is OK, i think Do you know, waht this Error means and how i can get rid of it? Thanks for your help! Lothar |
My System Specs![]() |
| | #2 (permalink) |
| | Re: File Extension In message <0D8F8D2F-52B8-4C38-8FB0-57B156781FD7@microsoft.com>, Lothar <Lothar@discussions.microsoft.com> writes >Hello! >Which File Extension is needed to execute a Powershell Script with a >doubleclick? By default at any rate, you can't do this. >And which tools do you use, to write a powershell script? textpad and notepad. >When i write a script with notepad, i get an error while executing: >Error while loading windows powershell-Console File "(Path to script)": >Invalid at the upper Layer of the document >(translated by myself from german :-) ) >my script starts with "start sleep 5", and this syntax is OK, i think >Do you know, waht this Error means and how i can get rid of it? Did you save in unicode? -- Thomas Lee doctordns@gmail.com MVP - Admin Frameworks and Security |
My System Specs![]() |
| | #3 (permalink) |
| | Re: File Extension Lothar wrote: > > And which tools do you use, to write a powershell script? Vim and PowerShellAnalyzer Rob Kenny |
My System Specs![]() |
| | #4 (permalink) |
| | Re: File Extension For writing scripts - notepad or Visual studio depending on what I'm doing. Theres a new version of Primal script that has excellent PowerShell support -- Richard Siddaway Please note that all scripts are supplied "as is" and with no warranty "Rob Kenny" wrote: > Lothar wrote: > > > > And which tools do you use, to write a powershell script? > > Vim and PowerShellAnalyzer > > Rob Kenny > |
My System Specs![]() |
| | #5 (permalink) |
| | Re: File Extension poweshell recognizes .ps1 files as powershell scripts. associate the file extension with powershell in windows, and it'll run, also don't forget to either sign your scripts, or Set-ExexcutionPolicy UnRestricted "Lothar" <Lothar@discussions.microsoft.com> wrote in message news:0D8F8D2F-52B8-4C38-8FB0-57B156781FD7@microsoft.com... > Hello! > Which File Extension is needed to execute a Powershell Script with a > doubleclick? > > And which tools do you use, to write a powershell script? > When i write a script with notepad, i get an error while executing: > Error while loading windows powershell-Console File "(Path to script)": > Invalid at the upper Layer of the document > (translated by myself from german :-) ) > my script starts with "start sleep 5", and this syntax is OK, i think > Do you know, waht this Error means and how i can get rid of it? > > Thanks for your help! > > Lothar > |
My System Specs![]() |
| | #6 (permalink) |
| | Re: File Extension > Error while loading windows powershell-Console File "(Path to script)": > Invalid at the upper Layer of the document Sounds like the file was saved with the extension ".psc1" rather than ".ps1". psc1 is a PowerShell Console File. ps1 is a PowerShell script which is probably what you want. > Which File Extension is needed to execute a Powershell Script with a > doubleclick? PowerShell doesn't enable this by default. It can be done but you'll have to enable it yourself. "Lothar" <Lothar@discussions.microsoft.com> wrote in message news:0D8F8D2F-52B8-4C38-8FB0-57B156781FD7@microsoft.com... > Hello! > Which File Extension is needed to execute a Powershell Script with a > doubleclick? > > And which tools do you use, to write a powershell script? > When i write a script with notepad, i get an error while executing: > Error while loading windows powershell-Console File "(Path to script)": > Invalid at the upper Layer of the document > (translated by myself from german :-) ) > my script starts with "start sleep 5", and this syntax is OK, i think > Do you know, waht this Error means and how i can get rid of it? > > Thanks for your help! > > Lothar > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| File Extension | Software | |||
| file extension | Vista General | |||
| File extension | Vista General | |||
| .pps file extension | Vista General | |||
| How do you change file name extension in File/Dir Explorer? | Vista General | |||