Proper usage for description-replace-character #679
-
Hi - sorry, I forgot about my issue #407 and didn't notice it was fixed/closed. I'm not getting the usage syntax correct. The best I can get is... *** SKIPPED : new and old description are the same ...and worst is some failure due to it just being wrong. I have two iterations I'm trying, both with the potential for multiple words separated by spaces.
Examples: (1) (A) (B) (C - I don't think there are any of these) (2) (A) (B) (C) How would the action=description-replace-character be formed? I understand the $$comma usage, but apparently that's it. Again, if you want real example, I can email you. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 4 replies
-
(1) (A)
2(A)
Based on these two example of course you need to focus on the order how you run these commands: 2A first then 1A, why: |
Beta Was this translation helpful? Give feedback.
-
I tried that - here's the full output: PowerShell version:
Translates to:
Output: *********** pan-os-php.php type=address UTILITY **************
**** PROCESSING OF 1 OBJECTS DONE **** ************* END OF SCRIPT pan-os-php.php type=address ************ |
Beta Was this translation helpful? Give feedback.
-
By the way, what is the significance of the comma in "replace=," - is it just separating the output or is it indicating that the OldWord was to be replaced with a comma? |
Beta Was this translation helpful? Give feedback.
-
Oh, if it matters - ",Filtering Server" is one of many elements. The elements (word or words separated by a comma and a space) fill the field (1,024 characters or less if there's something I want to keep before the first comma). Let me know if you want me to email you some samples. |
Beta Was this translation helpful? Give feedback.
-
My apologies - I made a mistake. My filter was for the wrong rule name for the comma test. I fixed that and it worked for the example above. Is there a limit to how many words can be sent to it? I'll email you shortly a couple of examples, but bottom line the descriptions are max length - 1024 characters. The warning I see appears to be coming from PAN-OS-PHP or maybe PHP and not PS, but I could be wrong. |
Beta Was this translation helpful? Give feedback.
-
FYI, I just emailed you details. |
Beta Was this translation helpful? Give feedback.
(1)
(A)
OldWord: Filtering Server
NewWord: nothing (leave description blank)
pan-os-php type=address 'actions=description-Replace-Character:Filtering Server'
2(A)
OldWord: ,Filtering Server
NewWord: Leave text preceding OldWord
pan-os-php type=address 'actions=description-Replace-Character:$$comma$$Filtering Server'
Based on these two example of course you need to focus on the order how you run these commands:
2A first then 1A, why:
if you run 1A first, then you only get ',' left