Thursday, March 2, 2017

Vmware SYSLOG Powercli

Connect-VIServer -Server (Read-Host "what is the vcenter to use?") -Credential (Get-Credential -Message "What is your VCenter Admin UserID & PW")

$Syslog = "udp://10.1.21.41:514"

$vmhosts = get-vmhost

#practice Run ##  Remove Line 6 to complete all Hosts
$vmhosts = $vmhosts|where {$_.name -eq "iad-esx-ucs1-05.st.com"}

foreach ($vmhost in $vmhosts)
{
#Display the ESXi Host being modified
Write-Output "Processing... $($vmhost.name)"

#Set the Syslog Server
$vmhost | Get-AdvancedSetting -Name Syslog.global.logHost | Set-AdvancedSetting -Value $Syslog -Confirm:$false

#Restart the syslog service
$esxcli = Get-EsxCli -VMHost $vmhost
$esxcli.system.syslog.reload()

#Open firewall ports
if(((Get-VMHostFirewallException -Name "syslog" -VMHost $vmhost).Enabled) -ne $true)
{Get-VMHostFirewallException -Name "syslog" -VMHost $vmhost | set-VMHostFirewallException -Enabled:$true}

}

Vmware Time Servers

0.vmware.pool.ntp.org, 1.vmware.pool.ntp.org, 2.vmware.pool.ntp.org, 3.vmware.pool.ntp.org

w32tm /config /manualpeerlist:10.1.16.123, 10.25.16.123 /syncfromflags:manual /reliable:yes /update

Vmware NSX SSL creation 

Using OpenSSL for NSX Manager SSL import: Creates CSR and 4096 bit KEY Creating NSX 6.4.2 SSL    openssl req -out nsxcert.csr -newkey rsa:40...