<p>I thought that I had the latest CTP of PowerShell 2 but when I try the command:</p>

<p><code>invoke-expression –computername Server01 –command 'get-process PowerShell'</code></p>

<p>I get an error message:<br>
<strong>A parameter cannot be found that matches parameter name 'computername'.</strong></p>

<p>So the question is: How can I tell which version of PowerShell I have installed? And what the latest version is?</p>

[{'answer_id': 12525, 'author': 'Kev', 'author_id': 419, 'author_profile': 'https://Stackoverflow.com/users/419', 'pm_score': 2, 'selected': False, 'text': "<p><code>$host.version.tostring()</code> will return the version number.</p>\n\n<p>RTM of v1 is 1.0.0.0</p>\n\n<p>Couldn't honestly tell you what the latest version of the previews are because I haven't had a chance to play yet.</p>\n"}, {'answer_id': 12780, 'author': 'Steven Murawski', 'author_id': 1233, 'author_profile': 'https://Stackoverflow.com/users/1233', 'pm_score': 1, 'selected': False, 'text': '<p>The latest CTP is CTP2 released on 05/02/08 and can be found <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=7C8051C2-9BFC-4C81-859D-0864979FA403&amp;displaylang=en" rel="nofollow noreferrer">here</a>.  Remoting requires WinRM to be installed on both the calling machine and the target machine.  Included in the CTP is a script to configure WS-Management called Configure-WSMan.ps1.  </p>\n\n<p>This command should get you the version number of PowerShell that you have installed.\nGet-Command "$PSHome\\powershell.exe" | Format-List FileVersionInfo\nV1.0 is 6.0.5430.0\nCTP2 is 6.1.6585.1</p>\n\n<p>I don\'t have the version number for the first CTP on hand, but I can find it if you really need it.</p>\n'}, {'answer_id': 13944, 'author': 'slipsec', 'author_id': 1635, 'author_profile': 'https://Stackoverflow.com/users/1635', 'pm_score': 0, 'selected': False, 'text': "<p>I'm guessing that this is a change to the cmdlet made during the configuration process Configure-Wsman.ps1.  I don't have an environment setup to test right now, but I'm guessing something went wrong with the configuration.  I can verify that on XP the parameter is not available (duh).  I'd assume that you will find the same on Vista/08 without the configuration completed.</p>\n"}, {'answer_id': 68933, 'author': 'Jaykul', 'author_id': 8718, 'author_profile': 'https://Stackoverflow.com/users/8718', 'pm_score': 2, 'selected': False, 'text': "<p>The problem is that from CTP 1 to CTP2, they switched up the Invoke stuff, all the remoting stuff is done through <code>Invoke-Command</code> now, and <code>Invoke-Expression</code> is solely for turning a string into a script ;)</p>\n\n<p>P.S.: If you're on v2 you can run <code>$PSVersionTable</code> to see a list of versions including the CLR and Build versions.</p>\n"}, {'answer_id': 575113, 'author': 'Jeffrey Snover - MSFT', 'author_id': 69339, 'author_profile': 'https://Stackoverflow.com/users/69339', 'pm_score': 2, 'selected': False, 'text': "<p>From last night's build (which means you might have this in CTP3 but if not, you'll get it in the next public drop):</p>\n\n<pre><code>[4120:0]PS&gt; $psversiontable\nName                           Value\n----                           -----\nCLRVersion                     2.0.50727.3521\nBuildVersion                   6.1.7047.0\nPSVersion                      2.0\nWSManStackVersion              2.0\nPSCompatibleVersions           {1.0, 2.0}\nSerializationVersion           1.1.0.1\nPSRemotingProtocolVersion      2.0\n</code></pre>\n\n<p>Experiment! Enjoy! Engage!</p>\n\n<p>Jeffrey Snover [MSFT]\nWindows Management Partner Architect</p>\n"}, {'answer_id': 1551482, 'author': 'aleksandar', 'author_id': 8766, 'author_profile': 'https://Stackoverflow.com/users/8766', 'pm_score': 0, 'selected': False, 'text': '<p>If the <code>$PSVersionTable</code> variable doesn\'t exist, then you are running V1.  </p>\n\n<p>If it exists, then the version will be available as <code>$PSVersionTable.PSVersion</code>.  </p>\n\n<pre><code>function Get-PSVersion {  \n    if (test-path variable:psversiontable) \n        {$psversiontable.psversion} \n    else \n        {[version]"1.0.0.0"}  \n} \n</code></pre>\n'}]
['https://Stackoverflow.com/questions/12501', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1463/']