Command not found

Welcome Forums General PowerShell Q&A Command not found

Viewing 2 reply threads
  • Author
    Posts
    • #241988
      Participant
      Topics: 40
      Replies: 119
      Points: 646
      Rank: Major Contributor

      Windows 2012 R2 NLB Server

      Wrote a little script to get the cluster information of the NLB server

      $ClusterSummary = get-nlbclusternode | out-string
      $ClusterSummary += Get-NlbClusterPortRule | out-string

       

      PS C:\Util> get-nlbclusternode
      get-nlbclusternode : Not found
      At line:1 char:1
      + get-nlbclusternode
      + ~~~~~~~~~~~~~~~~~~
      + CategoryInfo : NotSpecified: (:) [Get-NlbClusterNode], ManagementException
      + FullyQualifiedErrorId : System.Management.ManagementException,Microsoft.NetworkLoadBalancingClusters.PowerShell.GetNlbClusterNode

      ran this

      PS C:\Util> Import-Module NetworkLoadBalancingClusters

      still not found

      Ran this

      PS C:\Util> Get-Command -Module NetworkLoadBalancingClusters

      CommandType Name Version Source
      ———– —- ——- ——
      Cmdlet Add-NlbClusterNode 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Add-NlbClusterNodeDip 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Add-NlbClusterPortRule 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Add-NlbClusterVip 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Disable-NlbClusterPortRule 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Enable-NlbClusterPortRule 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Get-NlbCluster 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Get-NlbClusterDriverInfo 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Get-NlbClusterNode 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Get-NlbClusterNodeDip 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Get-NlbClusterNodeNetworkInterface 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Get-NlbClusterPortRule 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Get-NlbClusterVip 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet New-NlbCluster 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet New-NlbClusterIpv6Address 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Remove-NlbCluster 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Remove-NlbClusterNode 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Remove-NlbClusterNodeDip 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Remove-NlbClusterPortRule 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Remove-NlbClusterVip 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Resume-NlbCluster 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Resume-NlbClusterNode 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Set-NlbCluster 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Set-NlbClusterNode 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Set-NlbClusterNodeDip 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Set-NlbClusterPortRule 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Set-NlbClusterPortRuleNodeHandlingPriority 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Set-NlbClusterPortRuleNodeWeight 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Set-NlbClusterVip 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Start-NlbCluster 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Start-NlbClusterNode 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Stop-NlbCluster 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Stop-NlbClusterNode 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Suspend-NlbCluster 2.0.0.0 NetworkLoadBalancingClusters
      Cmdlet Suspend-NlbClusterNode 2.0.0.0 NetworkLoadBalancingClusters

       

      It shows in the list of commands

      I started powershell as administrator no change

      What am I missing here?

       

      Thank you

       

      Tom

       

       

       

       

       

    • #242024
      Senior Moderator
      Topics: 9
      Replies: 1450
      Points: 5,434
      Helping Hand
      Rank: Community MVP

      I don’t know why this error, but its actually not a command not found exception but some exception thrown by Get-NlbClusterNode cmdlet. the command really executed and shown the error for some reason, I think the reason is not clear here as the error is not properly handled inside the cmdlet.

    • #242105
      Participant
      Topics: 0
      Replies: 3
      Points: 62
      Rank: Member

      Hello Tom,

      Are you running this on your local machine or the cluster? The reason I ask is because some commands only run when you have the relevant feature installed on your machine. This commands requires you to have the Network Load Balancing feature installed to run this locally.

      HTH

      Luke

Viewing 2 reply threads
  • The topic ‘Command not found’ is closed to new replies.