Reply to Message

View discussion in a popup

Replying to:
BBB36
Enthusiast
Enthusiast

Thank you. The script appeared to update the syslog settings and enabled the syslog firewall service, but it displayed the output below in red:

Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
At H:\Files\Scripts\vSphere\syslog\esxi-syslog-configure.ps1:27 char:13
+             $esxcli.system.syslog.reload.invoke($sLog)
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FormatException
    + FullyQualifiedErrorId : System.FormatException
 
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
At H:\Files\Scripts\vSphere\syslog\esxi-syslog-configure.ps1:29 char:17
+ ...             $esxcli.network.firewall.refresh.Invoke(@{rulesetid = 'sy ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FormatException
    + FullyQualifiedErrorId : System.FormatException
 
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
At H:\Files\Scripts\vSphere\syslog\esxi-syslog-configure.ps1:27 char:13
+             $esxcli.system.syslog.reload.invoke($sLog)
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FormatException
    + FullyQualifiedErrorId : System.FormatException
 
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
At H:\Files\Scripts\vSphere\syslog\esxi-syslog-configure.ps1:29 char:17
+ ...             $esxcli.network.firewall.refresh.Invoke(@{rulesetid = 'sy ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FormatException
    + FullyQualifiedErrorId : System.FormatException
 
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
At H:\Files\Scripts\vSphere\syslog\esxi-syslog-configure.ps1:27 char:13
+             $esxcli.system.syslog.reload.invoke($sLog)
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FormatException
    + FullyQualifiedErrorId : System.FormatException
 
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
At H:\Files\Scripts\vSphere\syslog\esxi-syslog-configure.ps1:29 char:17
+ ...             $esxcli.network.firewall.refresh.Invoke(@{rulesetid = 'sy ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FormatException
    + FullyQualifiedErrorId : System.FormatException
 
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
At H:\Files\Scripts\vSphere\syslog\esxi-syslog-configure.ps1:27 char:13
+             $esxcli.system.syslog.reload.invoke($sLog)
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FormatException
    + FullyQualifiedErrorId : System.FormatException
 
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
At H:\Files\Scripts\vSphere\syslog\esxi-syslog-configure.ps1:29 char:17
+ ...             $esxcli.network.firewall.refresh.Invoke(@{rulesetid = 'sy ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FormatException
    + FullyQualifiedErrorId : System.FormatException
 
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
At H:\Files\Scripts\vSphere\syslog\esxi-syslog-configure.ps1:27 char:13
+             $esxcli.system.syslog.reload.invoke($sLog)
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FormatException
    + FullyQualifiedErrorId : System.FormatException
 
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
At H:\Files\Scripts\vSphere\syslog\esxi-syslog-configure.ps1:29 char:17
+ ...             $esxcli.network.firewall.refresh.Invoke(@{rulesetid = 'sy ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FormatException
    + FullyQualifiedErrorId : System.FormatException
 
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
At H:\Files\Scripts\vSphere\syslog\esxi-syslog-configure.ps1:27 char:13
+             $esxcli.system.syslog.reload.invoke($sLog)
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FormatException
    + FullyQualifiedErrorId : System.FormatException
 
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
At H:\Files\Scripts\vSphere\syslog\esxi-syslog-configure.ps1:29 char:17
+ ...             $esxcli.network.firewall.refresh.Invoke(@{rulesetid = 'sy ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FormatException
    + FullyQualifiedErrorId : System.FormatException

 Also, the report generated but only had the "FirewallRulesetNew" column, which was empty. Then I noticed that it didn't have a FirewallRulesetOld column so I added it to the script but it still failed with the same error, although it now has that column in the report and it too is empty. Could this just be that there's no way to properly display the syslog ruleset value?

Reply
0 Kudos