Host overall status
Hi All, I'm trying to generate the report for Host over all status from multiple vcenter server, but it while running the script. No error. Any pointers will be much appreciated. $userbane =...
View ArticleHow to get VM Guest/Config ConfiguredGuestId and RuntimeGuestId by using...
Hello, I would like to retrieve the VM Guest properties ConfiguredGuestId and RuntimeGuestId by using get-view and not get-vm.How do I do that? I cannot find it in VMware.Vim.GuestInfo,...
View ArticleMove-VM dosent work to move a VM to a DatastoreCluster for Cross VC Migrations
Hi Experts I have a Script to do cross VC migration which works perfectly. We use it everyday and its fabulousRecently we wanted to move a VM which we could not get into one datastore so we used...
View Articlevmk(n) -- portgroup (OpaqueNetwork NDVS)
Hi Expert i would like to get the source code of this view (in attached ) ,i accpet (powershell, powercli, RestAPI,esxCLI, ...)at least i need to get a table with first colomn vmk(number) and in the...
View ArticlePowerCLi script to Upload files into datastores for multiple hosts in parallel
Hello Friends, Recently i've got a scenario where i have to upload the files into multiple hosts in their local datastores around 2000+ boxes. I'm trying below scripts to upload the files to selected...
View ArticleThe module 'VMware.VimAutomation.Sdk' cannot be installed because the catalog...
Unable to install VMware.PowerCLI module getting error asPS C:\> Install-Module -name vmware.powerCLI -scope CurrentUser -Force -allowclobberPackageManagement\Install-Package : The module...
View ArticleGet VMXNET3 - Network DirectPath I/O Status
Hello Community, is there a way via script to get all VMs that have DirectPath I/O enabled?
View Articleconvert-html command
Hi luc ,can yu please check html command to get proper output . $path1 = 'D:\hc'$path = "D:\hc\compliance-$(Get-Date -Format 'yyyyMMdd-HHmm').html" #(get-credential).password |...
View Articleplink issues
any idea why this is not working $esxhosts = get-vmhost -name (get-content esxhosts.txt)#$root_pass = read-host -Prompt "Enter root PAssword"$root_pass = Read-Host -AsSecureString |...
View Articleintellisense _powercli
Hi Luc, Get-VMHostNetworkAdapter -VMHost $esxi -VMKernel|?{$_.while typing above i was expecting ManagementTrafficEnabled as one of the listed properties but i did not find that .not sure if its a...
View ArticleUSB passthrough via CLI
Hi, i have a unusual task. I wanted to know how i can passthrough USB devices via CLI, while my VM is on. Basically it always possible and always works fine via UI. As of today i can do this by...
View Articlesend multiple report attachment
Hi all, Need help to modify sending email for report using .net method that can send multiple attachmentthis is the original script : PowerCLI-1/CPReport-v2.1-Community-Edition.ps1 at master ·...
View ArticlePowerCLI performance vs clicking 'Export' button in vsphere UI.
Hello!I'm in the process of trying to automate some report gathering and data massaging that I've been tasked to do. This has led me down the road into PowerCLI, and many posts and answers (especially...
View ArticleSoftware Acceptance Level
I'm trying to get the software acceptance level for some hosts and then provide a resultbasicaly the script should collect the info and then compare it unfortunaly it's not working $esxcli = Get-ESXCLI...
View ArticleGet-EsxCli Could not establish secure channel for SSL/TLS with authority
despite that I'm adding the below to my script, I have always the error message : Get-EsxCli Could not establish secure channel for SSL/TLS with authority...
View ArticleEnsure the ESXi shell is disabled
I'm trying to create a script to disable ESXi shell, as I'm in the obligation to get the configuration before any change things I made the script like this #Collect configurationGet-VMHost |...
View ArticleCan anyone tell me why this 'else' statement is not working?…
Hi all, I have the following script to retrieve the tags from various vcenter servers however I cannot see why the 'else' statement in line 27 is throwing an error as not recognised? I have checked the...
View ArticleHow can i find out Power off particular VM time through powercli
How can i find out Power off particular VM time through powercli
View ArticleDatastore Load Report - Exclude DataStore
I have a report that shows all datastores in a DC and shows what percent is running on that datastore so I can check the load and keep it balanced manually if needed, but I added a cold storage...
View ArticlevCheck health - Does this make any changes ?
Hi All, I think the vcheck health script does not make any changes to vCenter , is that correct ? if yes will a read only account run it good idea ? Thanks
View ArticleList of Unused vCenter Roles
Hi all. I'm working on a review of unused vCenter roles in our environment and found this script below. Get-VIPermission | Select Role, Principal, Entity, UID | Export-CSV “E:\JCEM\Rights.csv” However,...
View ArticleOverall VM Utilization summary
Hi All, I'm trying to pull the VM utilization summary report for all the VM's in the below format, but it runs forever without any output. Can some experts help me resolve this issue....
View ArticleGet-View PodStorageDrsEntry.StorageDrsConfig.VmConfig with UpdateViewData()
Hi, is it possible to use UpdateViewData() method with Get-View on the ViewType "StoragePod" to Update the data of PodStorageDrsEntry.StorageDrsConfig.VmConfigfor the VM names without using another...
View ArticleGet-ESXCli get device smart info
When manually pulling the smart info using the NAA Identifier it works. But when it is stored in a variable, it doesn't. I'd like to be able to pull the smart info for all the devices from all the...
View ArticleVSS swicth - find missing portgroup & send alert in cluster
Hello What is best way to monitor cluster continuously for a missing port group on vss in cluster & report it. eg cluster of 3 nodes , someone created and added portgroup VLAN10 on host1 &...
View ArticleError when ruuning PowerCLI from .Net application
Hi, I have a .Net app which runs some PowerCLI scripts. I've recently had to rebuild my PC an LAB environment and now certain comands are throwing an error. The error is : "Could not retrieve handler...
View ArticleGet the list of ESXi servers /scratch locations path?
Hi All, Using this script, it is possible to automatically create /scratch directory location for multiple ESXi servers without causing outage during the business...
View Articleimport-csv
Hi Luc, i am getting very weird error .following code works fine till orangehowever when i m trying to get vmhost to do further activities it throws error . esxi1.localhost.com get-vmhost : 28/10/2020...
View ArticleRVtool like
HI gurus I am looking for a script that will bring up all the information that RVTools gets and export it, but on an specific folder instead of the entire env., is this even possible with pscli? Thanks...
View ArticleGet VMs with net adapter not connected
Hi all,I'm trying to get all the VMs that are "connected" state(to exclude maintenance mode ones) and the "Connect at power on" network adapter setting disabled.This is what I have but seems to be not...
View ArticlePowershell - get datastore disk usage rather than total VM disk usage
Hi. Thanks to LucD I am progressing with my script to get vCenter details but the one bit I am stuck on is with regard to the datastore disk usage particularly if a VM has more than one VMDK and they...
View Article"Invoke-VMScript Failed to authenticate with the guest operating system using...
Hello, I am trying to use Invoke-VMScript to run a specific command on Linux guest machines.The command errors with the following output:Invoke-VMScript : 29-10-2020 12:04:47 Invoke-VMScript Failed...
View ArticleManaging RDM Disks in QE Environment
Hello Folks, I am a QE engineer working with DellEMC PowerMax Storage. We work on SAN environment quite often and provision our storage LUNs to ESXi. Question:Is there an way to manage (add/remove) RDM...
View ArticleHow to run script in Power CLI
I have powershell version 4.0 and Power CLI version 6.5 Release build 4624819. If I run one line command like "Get-VMHostNetwork -VMHost $esx | Set-VMHostNetwork -DomainName $domainname -DNSAddress...
View ArticleChange MTU on physical ports without downTime
is there a way to change the MTU for physical NICs [vmnic] without downtime? The issue is that MTU 9000 was enabled on vmkernel and not enabled on physical ports which is not recommended and such kind...
View ArticleRestart information
Hello,Can someone please help me to how to find the restart information (Windows servers) such as: Date and time and who performed the taskI can get this last reboot information. But here I am looking...
View ArticleDatacenter migration script from standard to distributed portgroups with the...
Hello friends,I'm currently working on trying to migrating virtual machines to a new datacenter. Networks are identical (stretched) in both datacenters but we have to do a svmotion to move between...
View ArticleDistributedVirtualSwitchInfo with id 'xxx' does not exist
Hello there. I am trying to create vmk intarfaces with New-VMHostNetworkAdapter cmlet, but gettin the error "DistributedVirtualSwitchInfo with id 50 02 5a 5c 8c fc 30 be-15 99 73 74 7d 87 b7 37' does...
View Articleuse Get-VDPortgroup cmdlet in the VDS component
Hello I'm using the below script to get VDS Port Group it's working fine but I'm getting the warring message: WARNING: The output of the command produced distributed virtual portgroup objects. This...
View ArticleTemplate Update Script Not Finishing
I have a script that takes a template and converts it, updates the windows, then converts it back. Script works great with Win2016 & 2019, but I had to make a win10 template and it won't convert...
View ArticleExclude a group of VMs in a get-filter regex
Hi. I am having issues excluding a group of VMs from a regex expression in a get-filter. I won't bore everyone and list everything I tried, which has exhausted me. Essentially I am using this call...
View Articlefind VM that was deleted from vcenter
Trying to find a VM that was deleted from vcenter. Probablyt last 2 weeks is this right? Get-VIEvent-maxsamples ([int]::MaxValue) -Start (Get-Date).AddDays(–14) |...
View ArticleInvoke-VMScript Response status code does not indicate success: 403 (Forbidden)
Hi, Hope you're all well. I am using Invoke-VMScript to interact with Windows VMs. Something strange is happening. On my Windows 10 machine every time I do an invoke-vmscript, it carries out the script...
View ArticleUpdate VM template (non domain joined)
Hello, Has anyone found a neat way of updating their VM template with Windows updates without joining to the domain? I have found the following post which is also on another website but wondering if...
View ArticleConvert 500+ thick disks to Thin
Hi, I need a script which can covert thick disks to Thin, requirement is aa below. 1. Get VM name/Thick disks list, source datastore and destination datastore from CSV file.2. Move only the thick...
View ArticleIMM Ip Address through PowerCLI
hello I am exeucting following line from https://www.altaro.com/vmware/esxi-ilo-idrac-powercli/Get-VMHostWSManInstance –Vmhost (Get-VMhost ESX01.tglab.lcl) –IgnoreCertFailures –Class...
View ArticleIs a way to extract installed softwares and version for auditory with PowerCLI?
Hello, I have an audit. I need to extract for each vm an installed softwares and I don't know if exist a way through vmware cli. Thanks and regards,Tomás
View ArticleSCSIcanonicalname?
Hi, I am using the following script to keep track of RDMs in relation to migrations. $DiskInfo= @()$vm = Get-Cluster "CLUSTERNAME" | Get-VM foreach ($VMview in Get-VM $vm | Get-View){foreach...
View ArticleDNS
Hello, Can someone please tell me: I have a text file called 'Server_IP' and in that sheet it has all the IPs.Is there anyway I can script and get the DNS names by doing nslookup of that IPs and get...
View Article