Setting the snapshot directory for a VM
Hi all, I've tried searching for a solution, but can't seem to find one. I need to use PowerCLI to set the snapshot directory of a VM, so when I take a new snapshot, the child disk is redirected to a...
View ArticleMultiple Vms from csv file
I am trying to run the below Powercli script to create VM's by reading user inputs and some basic data from a CSV file. The data that I read from the CSV file includes 1. VMName, Cluster, Network...
View ArticleNew-tagassignment run's very slowly. How to troubleshoot
My get-tagassignment and new-tagassignment commands takes 11 seconds on my 5.5 production vcenter with 1200 vm's. My beta 6.0 cluster is basically empty but it returns in just a second or two. I can...
View ArticleShared SCSI Controller and virtual disk report
Hi All, We are planning to do storage migration from one storage to another. Challenge here is identifying the SCSI sharing VM's (shared virtual disks mainly used for Clustered Applications like SQL...
View ArticleCreate Sheets in Excel for Output from Muliple Vcenters
Hi all, I was wondering to get the data in sheets in a Single Excel if i have to collect data from Muliple Vcenters.For example Get-VMhost output in sheet 1 name Vcenter 1 from Cluster 1 , Sheet...
View ArticleHow to create Content Library from PowerCLI ?
Hello,My Name is Fred and I have a Content Library problem... I have been looking around for the set of functions in PowerCLI to perform some tasks on VMWare new feature called Content...
View ArticleHow to change VM NIC to VMXNET3 without replacing MAC Address?
Hi Any procedure/powercli to change VMNIC adapter to VMXNET3 without replacing MAC address?
View Articleretrieve vmware.log and search for a list of machines
We are looking to query the VMware.log on a list of machines. We want to search for text in the KB article. Wonder if someone has written a script to do such a thing. VMware KB: Determining why a...
View ArticleConvert to MAC address format
I want to convert a set of numbers to the mac address format of 00:00:00:00:00:00. I've been looking at the .net format operator, but I don't see anything.If I wanted to convert $a = 'ba2b3cf03b2c' to...
View ArticlevCenterAlarms Module
I've been working on scripting vCenter Alarms lately and tried to use Get-AlarmScript cmdlet from the PowerCLI Reference 1st edition. It fails to create the alarm properly when I try and create the...
View ArticleAdd-VDSwitchPhysicalNetworkAdapter error - "vmnic must be managed by the same...
I am using PowerCli 6.0 R3 on vSphere 6.0 update 1b. I only have a single VM, my vCenter VM which is a Windows 2012 Server. I also have 2 Dell ESXi servers. I have successfully created a virtual...
View ArticleHash Table custom object
Hi I have the following script which should provide a table with vm names and the datastorecluster they reside on:- $hashT=@{}$vmlist = Import-Csv "C:\vmMove\vm3.csv"foreach ($vm in $vmlist){ $vmname =...
View ArticleHow can I get just 5 min interval counters from an ESXi host?
I'm connected to an esxi host with the powershell snapin (not a vcenter server). ESXi servers are supposed to aggregate realtim data (20 sec intervals) into 5 min intervals right? How do I get just 5...
View ArticleMetric doesn't exist, but documentation says that it should
According to this docdisk.totalReadLatency.average should be available for VMs but when I try it it tells me it does not exist: Get-Stat -Entity 'MyVM' -Stat 'disk.totalReadLatency.average'...
View ArticleGet an error at the end of get-stat output
When I run the following I get back data, but at the end of the output there is an error: Get-Stat -Entity 'ESXiHOST' -Stat 'disk.totalReadLatency.average'MetricId Timestamp...
View Articleget-vmhost error The underlying connection was closed: Could not establish...
I'm having a problem using the Get-VMHost command in a Powershell script I'm trying to develop. The command is simply Get-VMHost <hostname> | fl Where <hostname> is the actual name of...
View ArticleHow to find ESXi dump Collector and Syslog dump collector is set or not
Hello Team, I have 1000 ESXi hosts in our environment, I just want to confirm ESXi DUMP collector and Syslog dumpl collector is configured on all ESXi host or not. I request you to help me with...
View ArticleVVOL datastores
I have installed vsphere powercli 6.0 release 3. I want to use it to create VVOL datastores, but I do not find any option under "New-Datastore" command. I only see options to create NFS/VMFS datastores...
View ArticleExport and Import of Resource Pools using PowerCLI
I'm faced with a task of rebuilding a fresh vCentre server and bringing across all the ESXi hosts and VMs.I've got scripts in place to export virtual machine notes and annotations, folders, permissions...
View ArticleHow to find the VMFS datastore that is thin-provisioned ?
Hi People, Can anyone here please share some script to find the VMFS datastore that is thin-provisioned and its empty space that can be reclaimed ? Thanks, Source VMware KB: Using esxcli in vSphere 5.5...
View Article