Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: General » microsoft.public.windows.powershell
Thread: V2 script extensions

HTVi
TV Discussion Newsgroups

V2 script extensions
David Trimboli <trimboli[ at ]cshl.edu> 12/23/2008 2:31:50 PM
I always assumed the "1" in ".ps1" referred to the fact that it was
PowerShell v1. But now I see the CTP versions still using .ps1 for
scripts. I figured that .ps1 would continue to run v1 scripts (backward
compatibility), but a new extension, .ps2, would be used so they would
only run in PowerShell v2. So... why not? What's the "1" for?

--
David Trimboli
Windows Systems Analyst
Cold Spring Harbor Laboratory
Re: V2 script extensions
RickB <rbielaws[ at ]i1.net> 12/23/2008 2:53:48 PM
On Dec 23, 8:31 am, David Trimboli <trimb...[ at ]cshl.edu> wrote:
[Quoted Text]
> I always assumed the "1" in ".ps1" referred to the fact that it was
> PowerShell v1. But now I see the CTP versions still using .ps1 for
> scripts. I figured that .ps1 would continue to run v1 scripts (backward
> compatibility), but a new extension, .ps2, would be used so they would
> only run in PowerShell v2. So... why not? What's the "1" for?
>
> --
> David Trimboli
> Windows Systems Analyst
> Cold Spring Harbor Laboratory

You might also notice that the V2 CTP versions are installed into
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
Notice V1.0 in the name?
What you suggest might still happen.
Like being able to have both versions installed at the same time,
it's something I wish would have been put in place with CTP-1.
Here we are at CTP-3 and as wonderful as the enhancements are
that neither is feature is present.
Re: V2 script extensions
"Marco Shaw [MVP]" <marco.shaw[ at ]_NO_SPAM_gmail.com> 12/23/2008 3:07:03 PM
David Trimboli wrote:
[Quoted Text]
> I always assumed the "1" in ".ps1" referred to the fact that it was
> PowerShell v1. But now I see the CTP versions still using .ps1 for
> scripts. I figured that .ps1 would continue to run v1 scripts (backward
> compatibility), but a new extension, .ps2, would be used so they would
> only run in PowerShell v2. So... why not? What's the "1" for?
>

This should help:
http://blogs.msdn.com/powershell/archive/2007/11/02/ctp-versioning.aspx

Basically, even PowerShell v2 scripts will be .ps1 even when released...

If you search the net, there are unsupported ways of being able to run
CTPs and v1 side-by-side on the same machine... There was a post to
this newsgroup several months ago on this (kind of hidden though if I
remember in a thread).

Marco

--
*Microsoft MVP - Admin Frameworks
https://mvp.support.microsoft.com/profile/Marco.Shaw
*Co-Author - Sams Windows PowerShell Unleashed 2nd Edition (due December
15th, 2008)
*PowerShell Co-Community Director - http://www.powershellcommunity.org
*Blog - http://marcoshaw.blogspot.com
Re: V2 script extensions
David Trimboli <trimboli[ at ]cshl.edu> 12/23/2008 5:47:40 PM
Marco Shaw [MVP] wrote:
[Quoted Text]
> David Trimboli wrote:
>> I always assumed the "1" in ".ps1" referred to the fact that it was
>> PowerShell v1. But now I see the CTP versions still using .ps1 for
>> scripts. I figured that .ps1 would continue to run v1 scripts
>> (backward compatibility), but a new extension, .ps2, would be used
>> so they would only run in PowerShell v2. So... why not? What's the
>> "1" for?
>>
>
> This should help:
> http://blogs.msdn.com/powershell/archive/2007/11/02/ctp-versioning.aspx

Ah, yes, that explains it. Thanks!

--
David Trimboli
Windows Systems Analyst
Cold Spring Harbor Laboratory
Re: V2 script extensions
Thomas Lee <tfl[ at ]psp.co.uk> 12/27/2008 10:42:14 PM
In message <e9MpysQZJHA.3844[ at ]TK2MSFTNGP03.phx.gbl>, David Trimboli
<trimboli[ at ]cshl.edu> writes
[Quoted Text]
>I always assumed the "1" in ".ps1" referred to the fact that it was
>PowerShell v1. But now I see the CTP versions still using .ps1 for
>scripts. I figured that .ps1 would continue to run v1 scripts (backward
>compatibility), but a new extension, .ps2, would be used so they would
>only run in PowerShell v2. So... why not? What's the "1" for?

Version 1 of the architecture was how I understood it. Version 2 is just
a refinement on V1's content.

I could be wrong!
--
Thomas Lee
doctordns[ at ]gmail.com

Re: V2 script extensions
"Josh Einstein" <josheinstein[ at ]hotmail.com> 12/28/2008 11:08:24 PM
Personally, I feel they're creating enough confusion to rival the ".NET 3.0
on CLR 2.0" mess.

Seems kinda short-sighted not to just add a new .ps2 script registration
that does exactly the same as .ps1.

Josh Einstein

"Marco Shaw [MVP]" <marco.shaw[ at ]_NO_SPAM_gmail.com> wrote in message
news:exMRtBRZJHA.5108[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
> David Trimboli wrote:
>> I always assumed the "1" in ".ps1" referred to the fact that it was
>> PowerShell v1. But now I see the CTP versions still using .ps1 for
>> scripts. I figured that .ps1 would continue to run v1 scripts (backward
>> compatibility), but a new extension, .ps2, would be used so they would
>> only run in PowerShell v2. So... why not? What's the "1" for?
>>
>
> This should help:
> http://blogs.msdn.com/powershell/archive/2007/11/02/ctp-versioning.aspx
>
> Basically, even PowerShell v2 scripts will be .ps1 even when released...
>
> If you search the net, there are unsupported ways of being able to run
> CTPs and v1 side-by-side on the same machine... There was a post to this
> newsgroup several months ago on this (kind of hidden though if I remember
> in a thread).
>
> Marco
>
> --
> *Microsoft MVP - Admin Frameworks
> https://mvp.support.microsoft.com/profile/Marco.Shaw
> *Co-Author - Sams Windows PowerShell Unleashed 2nd Edition (due December
> 15th, 2008)
> *PowerShell Co-Community Director - http://www.powershellcommunity.org
> *Blog - http://marcoshaw.blogspot.com

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen