This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Modification of Policy Report Rules

I am trying to automate the customization of policy report rules. The example is I would like update the rules that define the NTP server settings the complacency reports use to judge if my switches are configured correctly.

I can find the URI for the rule with:

$uri = Get-SwisData $swis "SELECT uri FROM Cirrus.PolicyRules where name = 'NTP Server Settings' and grouping = 'Cisco Time Settings'"

When I make the call to change the value I meet with:

PS C:\Windows\system32> set-swisobject $swis -Uri $uri -properties @{ comment = "Ensures the Network Time Protocol (NTP) is configured properly (IP: 192.168.71.30)"}

set-swisobject : Operation not supported on Cirrus.PolicyRules

At line:1 char:1

+ set-swisobject $swis -Uri $uri -properties @{ comment = "Ensures the  ...

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

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

    + FullyQualifiedErrorId : SwisError,SwisPowerShell.SetSwisObject

How can I find the operations supported on Cirrus.PolicyRules or is there a different way to approach the change?

  • This is an old post, but I'm working with this at the moment. You would want to use the GetPolicyRule and UpdatePolicyRule SwisVerbs like so:

    $ruleGuid = [ENTER PolicyRuleID HERE]

    $ruleFromServer = Invoke-SwisVerb -SwisConnection $swis -EntityName Cirrus.PolicyReports -Verb GetPolicyRule -Arguments $ruleGuid.ToString()
     
    <# Manipulate the values as necessary #>
     
    Invoke-SwisVerb -SwisConnection $swis -EntityName Cirrus.PolicyReports -Verb UpdatePolicyRule -Arguments $ruleFromServer