Posts

Showing posts from August, 2015

PowerCLI: Configuring an All-Flash vSAN

Image
From my understanding all-flash vSAN works like this: Caching Tier is 100% Writes. (Write Buffer) Capacity Tier is Mixed-Use With this in mind, I ordered Dell R730's w/ two types of drives.  Two high write endurance SSD's and Four Mixed Use SSD's. Short Story: Here is the script I created to 'tag' the mix-use drives as flash capacity: #Enable All Flash vSAN Intelligently Add-PSSnapIn -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue $TargetHosts = Get-VMHost $CacheDiskVendor = "TOSHIBA" $CacheDiskModel = "PX02SSF040" $CapacityDiskVendor = "TOSHIBA" $CapacityDiskModel = "PX02SMF040" Foreach ($VMhost in $TargetHosts) { $ESXCLI = $VMHost | Get-ESXCLI $Storage = $VMhost | Get-VMHostStorage Foreach ($SCSILUN in $Storage.ScsiLun) { If ($SCSILUN.Vendor -match $CapacityDiskVendor -and $SCSILUN.Model -match $CapacityDiskModel) { $ESXCLI.vsan.storage.tag.

PowerCLI: Configure/Enable Remote Syslog

[Updated ESXCLI call to v2 to reload syslog service] Been spoiled w/ Log Insight , so didn't realize what I needed to do to get logs forwarded to Splunk Cloud from ESXi hosts.  Here is the script I wrote up to do so: #Gets your list of hosts to configure for remote syslog. $VMHosts = Get-VMHost #$VMHosts = Get-Cluster MyCluster | Get-VMHost #Uncomment and comment line above if you want to target hosts in a cluster only. #The remote syslog destination(s). $SyslogValue = "tcp://192.168.123.5:514,udp://192.168.123.6:514" #If Replace is set to true, will simply overwrite whatever is populated currently. If False, then it will append. $Replace = $true #If ConfirmPreference is set to true, this script will ask you on every single host whether you want to make the change. Set to $False, if you just want it to do it. $ScriptConfirmPreference = $false ## Don't modify from here ## $AdvancedSettings= $VMHosts | Get-AdvancedSetting| where {$_.name -match "syslog.glo