add (VMware-)snapins at start

# Check if profile-file exists (difference between powershell and powershellISE)
Path $profile

# create, if it not exists
Item -path $profile -type file -force | Out-Null

# ADD to prifile file:
#Load Windows PowerShell cmdlets for managing vSphere
Add-PsSnapin VMware.VimAutomation.Core -ea “SilentlyContinue”
Add-PsSnapin VMware.VimAutomation.VDS -ea “SilentlyContinue”
# if necessary, add more snapins according to PowerCLI User Guide

add (VMware-)snapins at start

set syslog settings

# Conncect to vCenter Server/Host
Connect-VIServer -Server a.b.c.d -user username -password password
Get-VMHostAdvancedConfiguration -name Syslog.Remote.Hostname -VMhost fqdn
Set-VMHostAdvancedConfiguration -name Syslog.Remote.Hostname IP-ADRESSE -VMhost fqdn

# show syslog settings
Get-VMHost ESXHostnameOrIP | Get-VMHostSysLogServer
# set syslog settings
Get-VMHost ESXHostnameOrIP | Set-VMHostSysLogServer -SysLogServer SyslogHostnameOrIP -SysLogServerPort PortNumber

# for hosts added by Connect-VIServer
Get-VMHost | Set-VMHostSysLogServer -SysLogServer  a.b.c.d -SysLogServerPort 514

set syslog settings