Finding a backing storage container in the vSphere MOB
I'm running into a bit of a pickle trying to automate creation of VVol datastores. The problem seems to be that when a storage container is created, its not immediately available for use. The following...
View ArticleGet-Log: The operation has timed out
So we have a script that takes an ESXi host and just does: Connect-Viserver [ESXihostname] -Credential (Import-clixml [credfile])Get-Log -Bundle -DestinationPath E:\Logs\ However, about exactly 5 min...
View ArticleWhat does ProvisionedSpaceGB Include?
Can anyone tell me if provisionedSpaceGB in powerCLi includes space for all virtual machine files such as swap files and page files? Thanks!
View ArticleScript to change DNS and NTP needed
I am new to scripting. I am looking for a script that will change the two DNS server IPs as well as change the NTP server and restart the NTP servicen of an ESX host. Could it also make the change on...
View ArticleMail the powercli output
I'm little new to powercli. I have created a script to list all the ESXi hosts across our vCenters which are not in Connected state. I'm able to get the output as a text format and was able to schedule...
View ArticleHow to get report of unused VMDKs?
Guys, is there a way we can get report of unused VMDKs using any free tool or PowerCLI?I am suspecting some of the virtual machines were removed from inventory a long back instead of deleting them from...
View ArticleHow to enable and disable SSH on Multiple Esxi in vCenter
Hi All,Recently our security team asked for enabling ssh services on all esxi running in vcenter in different datacenter and cluster to scan authentication VA on each esxi.This is bit of pain to go to...
View ArticleScript to migrate cluster from one vCenter to another vCenter
Attached is a script I use to migrate an ESXi cluster from one vCenter to another. I'll be updating the script (will add VM folder locations and attributes, more qa, root credential storage - PASSWORD...
View Articlevcheck - Hardware status warnings
I keep getting this error from vcheck on a host but from the hardware side, we see no errors. It HP server and there are no errors. hardware monitoring service is not working in vcenter so I cannot see...
View ArticleISCSI with Chap and Mutual Chap
I'm trying to setup chap and mutual chap on an hba for an iscsi connection on ESX6.5 with Power-CLI 6.5. I grab the hba and then setup a new iscsi hba target and specify chap and mutual chap. $hba =...
View ArticleGetting and Setting vmKernel IP
Currently I have this: $vmkernel0 = Get-VMHostNetworkAdapter | where { $_.PortGroupName -eq "xxx" } | Select NameSet-VMHostNetworkAdapter -VirtualNIC $vmkernel0 -IP $xxx -SubnetMask $xxx im receiving...
View ArticleMigrate all permissions from a built in role to a new role.
I'm in an environment where a built in vCenter role was used. There are many permissions set using this role at different levels of the vCenter. What approach would you take to point all the existing...
View ArticleFor Each Loop and Set-VMNetworkAdapter
I have two seperate rows in my csv. So two different hosts and values I want to manipulate.Im calling the foreach to grab the first host, connect to it and get/set vmkernel IP. Then its supposed to...
View Articleguest os ipaddress,subnet and gateway information
HelloCan Some one correct me on below script...&{foreach($vm in (Get-VM)){ $vm.ExtensionData.Guest.Net |Select @{N="VM";E={$vm.Name}}, @{N="Host";E={$vm.VMHost.Name}},...
View ArticleLooking for a Power CLI query /script which will dump all the contents of a...
Hi All, I am new to vmware and a beginner on power cli.I am posting a question for the first time :-) I am in need to gather information about all the folder in a datastore . What i exactly need is a...
View ArticleUse of CLI to Console into VM for automation
Hi,I am currently looking at using a tool (such as iTest) to perform some sanity check on all the VMs on my ESXi environment. The process involves logging onto all the VMs through their respective...
View ArticleVM Status Loop
Hi, I'm hopping someone may be able to help me out with a script issue i am having. What i am trying to achieve is to create a if/do loop for each VM in a list that will continuously loop until X...
View ArticleHelp on running plink for multiple servers.
Sorry for posting here but I am sure the Master LucD will help me on this.Please correct me on this code.When I execute without using for loop for importing servers the command is executing...
View ArticleNeed script to enable "Check and upgradetools during power cycling" on all VMs
What is the best method for enabling this option on all VMs? Is there a good way to do it without either editing the VMX files on every machine or doing it manually though edit settings?
View Article