First you need to connect to a vCenter: Connect-VIServer -Server VCENTERIP -User USERNAME -Password PASSWORD Get-VMHost | Sort | Select Name, @{N="FC Device";E={[string]::Join(",",(($_ | Get-View).Config.StorageDevice.HostBusAdapter | where{$_.GetType().Name -eq "HostFibreChannelHba"} | …
Read MoreThis is a small function to rename the local datastore of a fresh installed ESXi server from datastore1 to SERVERNAME-local. $ServerIP="192.168.4.3" function renameds { $vmHost = Get-VMHost -Name $ServerIP $dsname = $vmHost + "-local" Get-Datastore -Name datastore* | Set-Datastore -Name $dsname }
Read MoreThis is a small scriptlet to copy the ResourcePools (just the ResourcePools no settings or VM’s) of Cluster1 to Cluster2 Connect-VIServer -server VCENTER-IP -User USERNAME -Password PASSWORD $respools = Get-ResourcePool -Location CLUSTER1 foreach ( $respool in $respools ) { Write-Host $respool New-ResourcePool …
Read MoreThis script node will open a small window with a drop down menu with all your VM’s listed. Select one and click on OK. The script will collect some information and then display them. Script node: if ($global:defaultviservers) { #Generated Form Function function GenerateForm { …
Read MoreConnect-VIServer -server VCSERVER -User USER -Password PASSWORD $vms = Get-VM | Sort Name $on = 0 $toolsOk = 0 $toolsOld = 0 $toolsNotInstalled = 0 foreach ($vm in $vms){ if ($vm.PowerState -like "PoweredOn"){ $vmview = $vm | Get-View $toolsstatus = $vmview.Guest.ToolsStatus $toolsrunningstatus = …
Read MoreConnect-VIServer -server VCENTER -User USER -Password PASSWORD $vms = Get-VM foreach ($vm in $vms) { $vmview = $vm | Get-View foreach ($device in $vmview.config.hardware.device) { if ($device.Key -eq 500){ $test = $device.DeviceInfo.Summary $result = $device.videoRamSizeInKB if ($result -cgt 30000){ $mb = $result/1024 …
Read MoreVariables: $ServerIP = "YourESXiServerIP" $SysLog = "YourSyslogServerIP" Configure Syslog server using Powershell function syslog { $VMHost = Get-VMHost -Name $ServerIP Set-VMHostSysLogServer -VMHost $VMHost -SysLogServer $SysLog -SysLogServerPort 514 } Configure NTP server and restart NTP service …
Read MoreToday we got our first HP DL380G6 server with 2x 2,8GHz Intel Nehalem, 72GB RAM and 2x 146GB Disks. I have successfully installed VMware ESXi 4 on this box. After this I have started the configuration. In the next days I’m going to run some test on this box and hopefully get the 2nd HP Dl380G6. I’m currently working on …
Read MoreCurrently I setup a Windows XP appliance which I would like to use for a new way to manage a VMware ESXi plattform. A colleague had this idea to create an interface to manage ESXi free server’s from any kind of CMS. Some details: OS: Windows XP Software: Apache, PHP, Powershell, VMware PowerCLI, JSON for PHP more …
Read More