Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20958

Re: Extracting Data from Orion database

$
0
0

The module is the part of Orion SDK and related assemblies should be installed while installing the package. Then is enough to add the snapin to powershell by "Add-PSSnapin SwisSnapin" command.

Then you can start your scripts e.g. like this:

########################################################################################################################

Clear-Host

if (!(Get-PSSnapin -Name "SwisSnapin" -ErrorAction SilentlyContinue))

  {

  Add-PSSnapin SwisSnapin -ErrorAction SilentlyContinue

  }

 

$swisTarget = 'localhost'   ## IP or hostname of SWIS

[System.String]$username="admin"

[System.String]$password="123"

 

$SWIS_Connection = Connect-Swis -host $swisTarget -UserName $username -Password $password

 

##Then you can get your results e.g.:

$Results = Get-SwisData $SWIS_Connection "Select NodeID, Caption from Orion.Nodes"

########################################################################################################################

 

Then the $Results variable will be filled by array of the results


Viewing all articles
Browse latest Browse all 20958

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>