title: Unable to determine if the computer '<CLUSTER-NAME>' exists in the domain - New-Cluster cmdlet
body: <p>I am trying to run the <code>New-Cluster</code> command via staf to create a cluster on (Windows server 2012 R2, having <code>failovercluster</code> role enabled) and PowerShell version is 3.0.</p>
  
  <p>Tried 2 different ways but none of it is working for me.
  When I am passing session parameter to <code>Invoke-Command</code>, it's able to find <code>New-Cluster</code> cmdlet, but when I try without session, it is not able to find the cmdlet.</p>
  
  <p>Here is the snippet of both methods:</p>
  
  <ol>
  <li><p>Staf "start shell command" way:<br>
  When I use this method, I encounter the error as seen below:</p>
  
  <pre><code>staf &lt;Server-IP&gt; process START SHELL COMMAND :187:Invoke-Command -ScriptBlock
  </code></pre>
  
  <p>Error I get is as seen below:</p>
  
  <blockquote>
    <p>New-Cluster : The term 'New-Cluster' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.</p>
  </blockquote></li>
  <li><p>Using PSSESSION way:</p>
  
  <pre><code>staf &lt;Server-IP&gt; process START SHELL  COMMAND :221:$ps = New-PSSession; Invoke-Command -session $ps -ScriptBlock
  </code></pre>
  
  <p><code>New-Cluster</code> command executes, but it fails with error as seen below:</p>
  
  <pre>New-Cluster : Unable to determine if the computer '&lt;CLUSTER-NAME&gt;' exists in
  the domain '&lt;DOMAIN-NAME&gt;'.
  &plus; CategoryInfo          : NotSpecified: (New-Cluster : U...XXXXXXXX'.:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
      + PSComputerName        : localhost
  
  An operations error occurred.
  At C:\XXXXXX.ps1:7 char:1
  &plus; New-Cluster -Name $cluster -Node $nodes -StaticAddress $staticaddress
  &plus; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : NotSpecified: (:) [New-Cluster], ClusterCmdletException
      + FullyQualifiedErrorId : New-Cluster,Microsoft.FailoverClusters.PowerShell.NewClusterCommand</pre></li>
  </ol>
  
  <p>I don't want to use session parameter, is there any way by which we can use the non-default modules for remote command invocation?
  Can someone please suggest if I am missing any needed input or please suggest if I should try some other method to attain the expected result.</p>