8

Which version of ESXi are you trying to install.. I think the drivers for those are now included in 5.1 (I might be wrong though). Alternatively, you can try to use the Dell customized build of ESXi ISO to install VMWare and see if those include the required drivers you need.


7

Just query the VM with get-vm and add | Select UsedSpaceGB. For example, you could type: get-vm | Select Name, UsedSpaceGB, ProvisionedSpaceGB


5

My understanding of this issue is that in the implementation of Move-VM, PowerCLI runs an async task, gets the task and then runs Wait-Task on it. If the operation is very fast, it will fail with this issue. This is an educated guess stemming from the fact that this is the exact exception you get when you Wait-Task for a completed task. So basically your ...


5

What information do you actually want to get? Get-VMHost has a field for build. This will give you the ESXi build number, which is a more reliable way of telling which version of ESXi you are on than the version number (as the build number also accounts for patches and mid version updates). There is also a field for Version There's also a field for ...


5

No. Turns out you can't have a three-character answer on this site :)


4

After more than an hour of searching around and trial-and-error, i followed what Mario Lenz said: C:\Program Files (x86)\VMware\VMware Remote Console\vmrc.exe vmrc://[USERNAME]@[VC]/?moid=[VM-MOREF-ID] [VM-MOREF-ID] can be found in the URL, in recent web client versions (i connected to the web client of an ESXI 6.5 vCenter). Open the web client, login and ...


4

Well, I see you've commented out the line that attempts to do the actual arithmetic. Your code as it is right now says "if partition starting offset = 65536 then partition is aligned". That's not how it works. Partitions have all sorts of starting offsets. The WMI class returns 2 partitions on my laptop right now, neither of which have a starting offset of ...


4

So these are HP ProLiant servers. You have a variety of methods to gain the inventory information you're looking for... Of the available choices, querying the VMware host via PowerCLI is about the last option I'd use... HP Blade Chassis Onboard Administrator via SSH or Web. Individual server ILO interfaces via SSH or Web. From within the running operating ...


4

Another way that can work: Download the offline software bundle for the NetXtreme I cards from VMWare. Download the ESXi Customizer software Extract ESXi customizer Run ESXi customizer as an administrator. Select the ISO file Select the .VIB file for the drivers Select an output directory During the installation, allow ESXi customizer to replace the VIB ...


4

You can use the PowerCLI command to set the number of CPUs on a VM: Get-VM <VM Name> | Set-VM -numCPU 2


4

You can do this easily with powercli, as there is a 'remove-shapshot' cmdlet: $oneMonthAgo = (Get-Date).AddDays(-30) Get-VM | Foreach-Object { Get-Snapshot -VM $_ | Foreach-Object { if($_.Created -lt $oneMonthAgo) { Remove-Snapshot $_ -Confirm -WhatIf }}} I put the -Confirm and -WhatIf in there because Remove-Snapshot could potentially do a lot of damage --...


3

To find all vmhosts with alarm status = "red", I expanded on this. # # Find all hosts with triggered alarms in "Red" state # $esx_all = Get-VMHost | Get-View $Report=@() foreach ($esx in $esx_all){ foreach($triggered in $esx.TriggeredAlarmState){ If ($triggered.OverallStatus -like "red" ){ $lineitem={} | Select Name, AlarmInfo ...


3

The sDRS schedules are regular vCenter scheduled tasks. There are few blog posts available on how to list these with PowerCLI, e.g. here: https://virtualbyte.wordpress.com/2014/09/05/retrieve-vcenter-scheduled-task-with-powercli/ http://rvdnieuwendijk.com/2013/01/19/get-vmware-vcenter-scheduled-tasks-with-powercli/ I personally like this one liner from the ...


2

With the smbiosDump command it is possible to know how many RAM expansion slots and which are connected in each one. Example: To know the number of slots: smbiosDump | grep -A 4 'Physical Memory Array' It shows us the total RAM installed for 12 slots: smbiosDump | grep -A 12 'Memory Device' Here more detail of how it works: https://www.sysadmit.com/...


2

Make this easy on yourself - get the Dell-provided ESXi images. Those should have all the hardware things you might need.


2

I wrote this function for deployment scripts which takes the IP address and does a lookup in an external file. Here's the code... Function Get-NetworkName { param($vmip) $ip = $vmip $ipArray = $ip.Split(".") $subnet = $ipArray[0] + "." + $ipArray[1] + "." + $ipArray[2] $path = "vlanmapping.txt" $vlanhash = ConvertFrom-StringData -StringData ([io....


2

I think I found an answer. This script could do it: http://www.virtu-al.net/2010/01/06/powercli-shutdown-your-virtual-infrastructure/ Please note the part in line 17ff where it waits for the VMs to be Shutdown cleanly Thank you Sergei! Connect-VIServer MyVIServer 2 3 # Get All the ESX Hosts 4 $ESXSRV = Get-VMHost 5 6 # For each of the ...


2

this is what i use. $esx = Get-VMHost $vmhost | Get-View foreach($triggered in $esx.TriggeredAlarmState){ $alarmDef = Get-View -Id $triggered.Alarm Write-Host $alarmDef.Info.Name }


2

Agree with the try...catch approach, but the if ($?) {} works well too, but won't catch exceptions that would normally throw the script completely. Either way, one of the strengths of PowerShell is also one of its weaknesses. I'm talking about pipelining. Yes, it's great that you can pass objects down the pipe, but when you're script is running in ...


2

I didn't have a look at VMRC yet and I'm no PowerCLI expert, but it looks like you can open a console like this: C:\Program Files (x86)\VMware\VMware Remote Console\vmrc.exe vmrc://[USERNAME]@[VC]/?moid=[VM-MOREF-ID] or C:\Program Files (x86)\VMware\VMware Remote Console\vmrc.exe vmrc://clone:[VC-TICKET]@[VC]/?moid=[VM-MOREF-ID] source You should be ...


2

Just in case anyone else comes across this issue, it would appear that the $task variable doesn't update by itself. In my case, I had to do: while($task.state -eq "Running") { Start-Sleep 5 $task = Get-Task -ID $task.id }


2

The link you mention says it is resolved in powercli v6, this is true in my experience. In my v5 code I always uses set-cddrive -ErrorAction:SilentlyContinue but It is not needed now.


2

From (the little) that i know: If you own the domain name and this domain name is registered to a Registration Authority and the entry is being added correctly into the Zone file of a Name Server and the propagation time is elapsed (depending on the TLS setted in Zone file) Then it should work


2

Under the networkinfo column I got the following "localhost:" instead of getting the host ip, mac, et.. so what is causing the NetworkInfo to not show the actual network info ? The NetworkingInfo property is actually an object of the VMHostNetworkInfo type, who's string representation is the host's 'Name' and 'Domain' glued together with a colon. This ...


2

Pity you're not on v6, it has this thing called Instant Clone that would speed up this kind of deployment. Anyway have you thought about just using a DHCP/dynamic-DNS solution for this kind of thing, you can pipe through a unique MAC to each VM which would then feed the DHCP to get hostname/IP/DNS details and then register with a dynamic DNS server once ...


2

I use this in part of a longer script I wrote for a migration projects. This is pulling names and csv I built earlier in the same script. Get-HardDisk -vm $line.Name | where {$_.filename -match $startDS} |Move-HardDisk -Datastore $endDS -Confirm:$false Where: $line.Name = name of a VM $startDS = the current datastore I was evacuating &endDS = the ...


2

Have you tested this without -Kill? From the Stop-VM cmdlet reference: Indicates that you want to stop the specified virtual machines by terminating their processes running on the ESX. You can use this parameter to stop a virtual machine that is not responding and cannot be stopped or restarted in other ways. To use the Kill parameter, you need to have a ...


2

To get batches of 10 you can use Select-Object with the parameters -First and -Skip: $start = 0 do { $VMs |Select -First 10 -Skip $start | Move-VM -Datastore $NewDatastore | Select Name |Out-File -FilePath "c:\logfile" -Append $start += 10 } until ($start -gt $VMs.Length) Appending to a file is just a parameter for Out-File. Using ...


1

EDIT: PowerCLI 6.5, announced on the PowerCLI blog 2016-11-17, installs VMRC and launches it with the Open-VMConsoleWindow command, ex. Get-VM -Name *VM-name* | Open-VMConsoleWindow Tunsworthy has posted the PowerCLI script Open-VMConsole on GitHub to launch standalone VMRC.


1

You mentioned: I have been unable to find a 30 minute session timeout which I can tweak in the script. I attempted to remove or increase the Web Session Timeout in PowerCLI without success:> Please try this, as it looks like the timeout from the vcenter host itself. vpxd.cfg file To configure the timeout and maximum number of sessions: ...


Only top voted, non community-wiki answers of a minimum length are eligible