Hello,
Running Orion NPM 10.6.0 and SDK 1.7 on Win2k8R2
Can anyone help with adding devices into Orion using Powershell?
To complete via NPM Web console, select Management, Edit Node.
Select groups, break down the group to a specific node.
Choose node properties, then edit node.
Custom properties show Device_Type:
Sample script adding a server fails for the custom properties:
---------------
Add-PSSnapin SwisSnapin
# initialize SWIS connection
$swis = Connect-Swis -Certificate
# add a node
$newNodeProps = @
{
EntityType="Orion.NodesCustomProperties";
DisplayName="servername_here";
Device_Type="Server_Windows";
}
$newNodeUri = New-SwisObject $swis –EntityType "Orion.NodesCustomProperties" –Properties $newNodeProps
$nodeProps = Get-SwisObject $swis -Uri $newNodeUri Orion.Nodes
Output:
PS C:\> $newNodeUri = New-SwisObject $swis -EntityType "Orion.NodesCustomProperties" -Properties $newNodeProps
New-SwisObject : Cannot bind argument to parameter 'Properties' because it is null.
At line:1 char:89
+ $newNodeUri = New-SwisObject $swis -EntityType "Orion.NodesCustomProperties" -Properties <<<< $newNodeProps
+ CategoryInfo : InvalidData: (:) [New-SwisObject], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,SwisPowerShell.NewSwisObject
PS C:\>
Similar blog =