To use this function add it to the class library file named PluginVCHostSystemService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: PluginVCHostSystemService.ts
Public Function: SyslogServerEnable
public SyslogServerEnable(objVcHostSystem: VcHostSystem): void {
this.SyslogServerToggle(objVcHostSystem, Constants.ESXI_SYSLOG_HOST);
}Public Function: SyslogServerDisable
public SyslogServerDisable(objVcHostSystem: VcHostSystem): void {
this.SyslogServerToggle(objVcHostSystem, "");
}Private Function: SyslogServerToggle
private SyslogServerToggle(objVcHostSystem: VcHostSystem, strSyslogHost: string = Constants.ESXI_SYSLOG_HOST): void {
let objVcOptionValue: VcOptionValue = this.VcOptionValueCreate("Syslog.global.logHost", strSyslogHost);
let arrVcOptionValue: VcOptionValue[] = [];
arrVcOptionValue.push(objVcOptionValue);
this.ApplyAdvancedSettings(objVcHostSystem, arrVcOptionValue);
this.FirewallRulesetEnable(objVcHostSystem, "syslog");
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
