Skip to content

Commit

Permalink
Changed Get-OrionNode & Remove-OrionNode to build out Orion Server Na…
Browse files Browse the repository at this point in the history
…me from the SWIS connection instead of explicitly passing it
  • Loading branch information
unknown authored and unknown committed Oct 30, 2015
1 parent 172afe2 commit 1f0e351
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 39 deletions.
Binary file modified Samples/PowerShell/PowerOrion/PowerOrion.psd1
Binary file not shown.
15 changes: 10 additions & 5 deletions Samples/PowerShell/PowerOrion/PowerOrion.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,10 @@ function New-OrionPollerType
If passed the -custom switch it can return
.EXAMPLE
PS C:\Scripts\Modules\Orion> Get-OrionNodeProperties -NodeID $nodeid -SwisConnection $swis -OrionServer $OrionServer
PS C:\Scripts\Modules\Orion> Get-OrionNodeProperties -NodeID $nodeid -SwisConnection $swis
.EXAMPLE
PS C:\Scripts\Modules\Orion> Get-OrionNodeProperties -NodeID $nodeid -SwisConnection $swis -OrionServer $OrionServer -custom
PS C:\Scripts\Modules\Orion> Get-OrionNodeProperties -NodeID $nodeid -SwisConnection $swis -custom
Key Value
--- -----
Expand Down Expand Up @@ -519,11 +519,11 @@ function Get-OrionNode
Parametersetname="IP")]
[String]$IPAddress,

#Orion Server Name
<# #Orion Server Name
[parameter(mandatory=$true)]
[validatenotnullorempty()]
[string]
$OrionServer="localhost",
$OrionServer="localhost", #>

#SolarWinds Information Service (SWIS) Connection
[parameter(mandatory=$true)]
Expand All @@ -539,6 +539,8 @@ function Get-OrionNode
Begin
{

$OrionServer = $SwisConnection.ChannelFactory.Endpoint.Address.Uri.Host

if($IPAddress){
write-debug "$(Get-TimeStamp) The value of "IPAddress" is $IPAddress"
write-verbose "$(Get-TimeStamp) IP passed, calling Get-OrionNodeID for $IPAddress"
Expand Down Expand Up @@ -749,12 +751,13 @@ function Remove-OrionNode
[Alias("IP")]
[String]$IPAddress,

<#
#Orion Server Name
[parameter(mandatory=$true)]
[validatenotnullorempty()]
[string]
$OrionServer,

#>
#SolarWinds Information Service (SWIS) Connection
[parameter(mandatory=$true)]
[validatenotnullorempty()]
Expand All @@ -764,6 +767,8 @@ function Remove-OrionNode

Begin
{
$OrionServer = $SwisConnection.ChannelFactory.Endpoint.Address.Uri.Host

write-verbose "$(Get-TimeStamp) Calling Remove-OrionNode..."
#First get the node ID, either implicitly, or explicitly
if ($NodeName){
Expand Down
34 changes: 0 additions & 34 deletions Samples/PowerShell/PowerOrion/Test-PowerOrion.ps1

This file was deleted.

0 comments on commit 1f0e351

Please sign in to comment.