I am rather new to using the PowerShell module, and support was no help, so here I am.
I have gathered a URI list in to a PowerShell array, but when I try to pass that data in to the following command:
Invoke-SwisVerb $swis Orion.AlertSuppression GetAlertSuppressionState @(,$uriList,"","")
The error is:
Invoke-SwisVerb : Type 'System.Management.Automation.PSObject' with data contract name
'PSObject:schemas.datacontract.org/.../System.Management.Automation' is not expected. Consider
using a DataContractResolver if you are using DataContractSerializer or add any types not known statically
to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to
the list of known types passed to the serializer.
At line:1 char:1
+ Invoke-SwisVerb $swis Orion.AlertSuppression[] GetAlertSuppressionSta ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-SwisVerb], SerializationException
+ FullyQualifiedErrorId : System.Runtime.Serialization.SerializationException,SwisPowerShell.InvokeSwi
sVerb
If I however copy one line out of the array and past it in to the same line, replaceing the $urilist, I get a return.
What am I doing wrong here?
This same exact method works without issue when I am looking at a node only, but a monitor on a node, it will not work.
Here is an example URI for the monitor on the node:
swis://<Server name>/Orion/Orion.Nodes/NodeID=205/Applications/ApplicationID=1241
where is when I am only looking at a node it looks like this
swis://<Server name>Orion/Orion.Nodes/NodeID=205