1 Reply Latest reply on Dec 12, 2016 4:37 PM by tdanner

    Lab 39 PowerShell Connection Issue

    nick_scott

      Hi all, I am trying to follow along with SLW Lab #39 where a powershell query was ran

       

      Select IPaddress, nodeid, caption

      From orion.nodes

       

      I seem to be having an issue when being asked for SwisConnection details.  I am getting the error below

       

       

      If I run the command shown below, it does seem to indicate I do connect  I am running this locally on a development application server instance

       

      Great lab video by the way, looking forward to another API lab hopefully.  Thanks!

        • Re: Lab 39 PowerShell Connection Issue
          tdanner

          When you run "Get-SwisData" with no arguments, PowerShell asks you for a value for the required "SwisConnection" parameter. You typed "Connect-Swis -Hostname ..." at the prompt. The problem is that this is not a prompt for a PowerShell command - it is a prompt for a string that PowerShell will use for this parameter.

           

          It will work better if you supply the arguments up front. Like this:

           

          $swis = Connect-Swis -Hostname xxxx -Username xxxx -Password xxxx

          Get-SwisData $swis "Select IPaddress, nodeid, caption From orion.nodes"

          1 of 1 people found this helpful