what's up with powershell versions?
the powershell install folder version 1.0 c:\windows\system32\windowspowershell\v1.0\ , script files had .ps1 extension. assumed subsequent versions appear in \v2.0\ , script filenames have .ps2 extension.
neither happened, perhaps in part avoid confusion "playstation 2" commonly referred ps2 ;-)
but seriously, now...
had assumption played out, might have seen multiple powershell versions on 1 computer, perhaps using filetype determine engine used.
in retrospect, changing extention on script files have caused issues along way when 1 upgraded powershell. bad did not settle on non-numeric file type like, example, .psh, .ps, .mps, etc.
the fact powershell integrated os , linked .net may have had affect on situation.
but water under bridge , of no real consequence, because powershell.exe supports version switch parameter:
-version
starts specified version of windows powershell. enter version number parameter, such "-version 1.0".
great, can develop v1.0 , v2.0 scripts on computer installed v2.0, right?
you tell me. when start powershell way $host.version gives same version information:
c:\users\al>powershell
windows powershell
copyright (c) 2009 microsoft corporation. rights reserved.
ps c:\users\al> $host.version
major minor build revision
----- ----- ----- --------
2 0 -1 -1
ps c:\users\al> exit
c:\users\al>powershell -version 1.0
windows powershell
copyright (c) 2009 microsoft corporation. rights reserved.
ps c:\users\al> $host.version
major minor build revision
----- ----- ----- --------
2 0 -1 -1
ps c:\users\al>
also, cmdlets new version 2.0 (like convertto-csv) still available when running -version 1.0.
so questions these:
1. actual function, if any, performed -version switch?
2. there way run functional version 1.0 of powershell on computer version 2.0 installed?
3. things improve v3.0, or more complicated?
note supporting server application standard installation includes installing powershell v2.0, working on workstation running version 2.0. in addition developing v2.0 scripts other environments, having ise available use.
any comments appreciated.
1. doesn't work in v2, works in v3 ctp1, in "public beta".
2. unsupported, there's hope: http://portablepowershell.com
3. dunno, see #1.
Windows Server > Windows PowerShell
Comments
Post a Comment