PowerCLI script to count paths to VMFS volumes

PowerCLI script to count paths to VMFS volumes

When implementing new storages or configure existing ones it is a good idea to check paths (state and amount) to volumes. When operating a few hosts using a few datastores this can be a very time-consuming task when using the GUI. Therefore I wrote the following function.

Read Me Leave comment

Script to check if VMs part of DRS-Groups

Recently I needed to check, if every VM of a cluster is part of at least one DRS-VM-Group. Typically this is a useful check if you operate a two (or more) site datacenter and/or stretched cluster. You then create DRS-groups for VMs and hosts. For each site a host- and at least a VM-group. At creation time of groups, every VM will be added to […]

Read Me Leave comment

4 ways to configure adv. settings in CLI

4 ways to configure adv. settings in CLI

There are a few CLI methods to configure advanced settings in ESXi Hosts. It depends on where you are (vMA/Linux, Windows Client, Console) and what you want to do (configure all hosts or just a specific host, …) which option fits best. Here I describe the options: native PowerCLI, esxcli (console), esxcli (get-esxcli), esxcli (get-esxcli -v2) to: List All settings All settings in a specific […]

Read Me 1 Comment

Create PSP rule for HPE 3PAR

Create PSP rule for HPE 3PAR

There are a few best practices when implementing a 3PAR into a vSphere environment. One of these is the creation of a custom PSP-rule. With this set, all 3PAR volumes are automatically configured according to best practices when they get mounted. In this post I will show ways to create this rule.  [Update] Because HPE Primera uses same vendor and model description as 3PAR, the […]

Read Me 2 Comments

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

Read Me Leave comment

eject CDs

# eject all media from every drive from every VM get-vm |get-cddrive |set-cddrive -nomedia

Read Me Leave comment

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

Read Me Leave comment
Social Share Buttons and Icons powered by Ultimatelysocial