Quantcast
Channel: THWACK: All Content - Orion SDK
Viewing all articles
Browse latest Browse all 2677

Powershell - Access to Orion.GroupCustomProperties denied

$
0
0

I was able to use the Solarwinds API to create a new empty Group using powershell, I will add nodes to it later.

 

$ugpid = "ABCD101"

$groupId = Invoke-SwisVerb $swis Orion.Container CreateContainer @(

 

# group name

$ugpid,

 

# owner, must be 'Core'

"Core",

 

# refresh frequency

60,

 

# Status rollup mode:

    # 0 = Mixed status shows warning

    # 1 = Show worst status

    # 2 = Show best status

    0,

 

# group description

    "$ugpid - Group auto-created by the PowerShell.",

 

# polling enabled/disabled = true/false (in lowercase)

$true,

 

# group members - EMPTY

([xml]"<ArrayOfMemberDefinitionInfo xmlns='http://schemas.solarwinds.com/2008/Orion' />").DocumentElement)

 

 

In custom properties of the group there is a property called GPID. I need to populate this with $ugpid (same as the name of the group).

So I do the following

 

$grCPUri = "swis://localhost/Orion/Orion.Groups/ContainerID=$groupID/CustomProperties"

 

$CustProps = @{

GPID = $ugpid;

}

 

Set-SwisObject $swis -Uri $grCPUri -Properties $CustProps

 

This fails with :

 

Set-SwisObject : Access to Orion.GroupCustomProperties denied.

At line:1 char:2

+  Set-SwisObject $swis -Uri $grCPUri -Properties $CustProps

+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (:) [Set-SwisObject], FaultException`1

    + FullyQualifiedErrorId : SwisError,SwisPowerShell.SetSwisObject

 

 

So how am I able to create the group and then not have the access to modify it, using the same credentials?

The credentials are my Active Directory domain credentials?

What am I doing wrong here?

Thanks


Viewing all articles
Browse latest Browse all 2677

Trending Articles



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