Skip to content

Virtually Caffeinated

A double-shot of knowledge

Menu
  • About Me
  • Useful Links

About Me

Profile
Jeremy Wheeler

I am an experienced Consulting Architect for VMware’s Professional Services Organization, End-user Computing specializing in VMware Horizon Suite product-line and SDDC. I have over 23 years of experience in the IT industry. In addition to his past experience, I have a passion for technology and thrives on educating customers. Additionally, I have 10 years of hands-on virtualization experience deploying full-life cycle solutions using VMware, CITRIX, and Hyper-V. I also has 18 years of experience in computer programming in various languages ranging from basic scripting to C, C++, PERL, .NET, SQL, and PowerShell. I’ve received acclaim from several clients for my in-depth and varied technical experience and exceptional hands-on customer satisfaction skills. In February 2013, I received VMware’s Spotlight award for my outstanding persistence and dedication to customers and was nominated again in October of 2013. I was awarded 2015 – 2017 vEXPERT.

  • Home
  • 2018
  • January
  • 17
  • vSphere Syslog Script
vRealize Log Insight

vSphere Syslog Script

Jeremy Wheeler
January 17, 2018January 18, 2018 1 min

Contents

  1. Script Syntax:
  2. Script:

I was working with a client recently who needed to route all their vSphere host’s syslogs to their Log Insight Manager server. I decided to write a script to automate the process. Hope this helps! You will need a machine with VMware’s PowerCLI installed <Tested on 6.5 Release 1 (Build 4624819)> to execute this script with the following parameters:

Script Syntax:

SysLogCfg <vCenter Server> <Admin Username> <Password> <vCenter Cluster Name> <SysLog Server IP>

Script:

# This script will set a Syslog Server all all ESXi hosts within a vCenter once connected.
# Seems to run a little more cleaner with this cmdlet and doesn't ask for confirmation
# Created by Jeremy Wheeler
# 01/17/2018

param($Server,$User,$Password,$ClusterN,$SysLogN)
Connect-VIserver -Server $Server -User $User -Password $Password
$sys = 'udp://' + $SysLogN + ':514'
$cl = get-cluster $ClusterN| get-vmhost

foreach($h in $cl){
  Set-VMHostSysLogServer -VMHost $h.name -SysLogServer $sys
  Write-Host 'vSphere Host: ' $h.name
  $syslog = Get-VMHostFirewallException -name ‘syslog’ -vmhost $h.name
  $syslog | Set-VMHostFirewallException -Enabled:$true
}

You can validate the script worked by checking one of the hosts in the cluster:

Script download link: SysLogCfg

Share :
whosay

Written by  Jeremy Wheeler: Jeremy

Post navigation

Previous: Steps for monitoring App Volumes with Log Insight Manager
Next: vRealize Operation Troubleshooting

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories

Recent Posts

  • Log Parsing Cheat Sheet
  • Virtually There: Presentations that Pop!
  • Cool Resources for your Kids at home during this time..
  • Move OmniGraffle Package to Flat Format
  • VMware User Environment Manager and Sysinternals BGinfo

Archives

RSS Press Releases

  • VMware Names Karen Dykstra as CFO; Zane Rowe to Depart Company May 25, 2023
    PALO ALTO, Calif.--(BUSINESS WIRE)-- VMware (NYSE: VMW), a leading innovator in enterprise software, today announced that Karen Dykstra will take on the role as chief financial officer and executive vice president in addition to her current role as a member of the VMware Board of Directors. Current VMware CFO and EVP Zane Rowe will be […]
  • VMware Unveils New Security Capabilities to Help See and Stop More Threats April 24, 2023
    At RSA Conference 2023, VMware will showcase lateral security designed to better protect multi-cloud and enterprise branch environments. PALO ALTO, Calif.--(BUSINESS WIRE)-- VMware, Inc., (NYSE:VMW) today announced new capabilities that deliver strong lateral security across multi-cloud environments so customers can better see and stop more threats. VMware Contexa, a threat intelligence cloud ...
  • VMware Accelerates and Simplifies Partner-Led Managed Services for the Multi-Cloud Era April 18, 2023
    New VMware Cross-Cloud managed services will make it easier for customers to adopt, manage, and better secure multi-cloud environments. PALO ALTO, Calif.--(BUSINESS WIRE)-- VMware, Inc. (NYSE: VMW) today announced VMware Cross-Cloud managed services, a set of prescriptive offers with enhanced partner and customer benefits that will enable highly skilled partners to expand their managed ...
Copyright VMBUCKET.COM © 2020