title: Why is invoke-command and new-pssession not working?
body: <p>I have no idea why this isn't working. Any ideas? I honestly don't know what else I can try.</p>
  <p>I plan to add it to a script that prompts the user for a computername / domain creds but I can't get it to work in a shell window for starters.</p>
  <p>Here's the line:</p>
  <pre><code>Invoke-Command -Session New-PSSession -ComputerName server001 -ScriptBlock {shutdown.exe /r -t 0} 
  </code></pre>
  <p>Here's the error:</p>
  <pre><code>Invoke-Command : Cannot bind parameter 'Session'. Cannot convert the &quot;New-PSSession&quot; value of type &quot;System.String&quot; to
  type &quot;System.Management.Automation.Runspaces.PSSession&quot;.
  At line:1 char:25
  + Invoke-Command -Session New-PSSession -ComputerName server001 -Scrip ...
  +                         ~~~~~~~~~~~~~
      + CategoryInfo          : InvalidArgument: (:) [Invoke-Command], ParameterBindingException
      + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.InvokeCommandCommand  
  </code></pre>
  <p>Sorry for not having anything further to add to this but I'm still trying to learn PowerShell and need guidance.</p>