Quantcast
Channel: VMware Communities : All Content - VMware PowerCLI
Browsing all 16717 articles
Browse latest View live

Get date/time and hostname

Hello, I would like to get date, time and hostname for each event in this script,  $report = @() $eventMgr = Get-View EventManager $events = foreach($event in $eventMgr.Description.EventInfo){...

View Article


Need a script to keep the MAC address when we export the vm to OVF file.

Hi Team,  Need a powercli script to keep the MAC address when we export the vm to OVF file.   From webclient we have the option to keep MAC address while exporting to ovf (please find the attachments)...

View Article


Accessing Total Provisioned Space on Datastore Summary Tab

I'm looking at the datastore summary tab for a datastore object in vSphere Client and I see what is on the attached screenshot. I can't seem to find this property on the object in powerCLI.  (At least...

View Article

Change CPU Affinity?

Hi, I'd like to know if it's possible to set and/or change cpu affinity via a powercli command?  I figured out how to return the data, not sure if it can be set or updated?

View Article

Get-VMFolderPath doesnt work when connected to 2 vcenters

I am attempting to use someold code I originally got from here: Get-VMFolderPath to check in which vm folder our vm resides | VMware and Powershell Which extracts the folder the VM resides in given a...

View Article


number of Get-StatType parameters in vcenter and ESXi from powerCLi

I am not able to get all required parameters from vCenter, but I am able to get those from ESXi. like net.transmitted.average,net.received.average,disk.read.average,disk.write.average -> vCenter...

View Article

DRSRule Module after upgrade powershell and powercli

After upgrade powershell to 5 build 10586 and powercli to 6.5.1 build 5377412 DRSRule-Master (https://github.com/PowerCLIGoodies/DRSRule) doesn't work properly.When I run f.e. my old piece of script:...

View Article

unable to export the output to csv/xls file

HiPlease find below my script. I am not able to export the output to csv/xls file. Please help me. And also i have 10 vcenters, I need this report in xls format with each VC worksheets in one excel...

View Article


Copying PVLANs and related PGs from dVS to dVS

Hello, I wrote a simple script to copy all PGs (including PVLANs) from an existing dVS to a new one. However I can't find a way if there is a way at all, to complete the PVLANs part. I looked at Luc's...

View Article


Can't install PowerCLI, looks to want to download the beta version

PS C:\WINDOWS\system32> Install-Module -Name VMware.PowerCLI Untrusted repository You are installing the modules from an untrusted repository. If you trust this repository, change its...

View Article

Script to get infomration of datastore per cluster

Hi All,  Good Morning! I am trying to write a script to get all datastore in the cluster and it should give me the data in table format like datastorename, clustername,capacityGB,...

View Article

List total number of vCPU per ESX host to avoid CPU over allocation when...

Hi,Can anyone please share your script to give a listing for all if VMHost / ESX CPU total count managed by VCenter that is available ?this is for me to be able to determine whic VMhost I can deploy my...

View Article

Script to list VMs, IP, PowerState and Host details

Hi All, Goodday! I am looking for a script to list VMs, IP, PowerState and Host details for 1700 stand alone ESXi host. Could you please and guide for the script. Thank you. Regards

View Article


PowerCLI to show Guest VM disk space capacity not working ?

Hi, Can anyone here please assist me in fixing the script that was created by LucD a few years ago to show the actual Guest OS disk space usage? $report = @() foreach($vm in Get-VM){    Get-HardDisk...

View Article

Image may be NSFW.
Clik here to view.

Command to get license key information of a host

Hi, I would like to fetch the license key of a single host Am able to fetch list of license keys assigned in a vcenter, but unable to fetch host wise. My requirement is , i will be connecting to...

View Article


I want to upgrade vmtools version along with vm hardware version with a...

This is how I'm planning to do - I'm going to install vmware tools version 10.1.10 by calling a exe setup file from a folder. If I use the default vmware tools install option, vmtoosl version 10.1.5...

View Article

Finding the created date of my VMDK file

Can someone help me querying the created date of my VMDK files. I could somehow query the last modified date of my VMDK files; however, I don't see any decent way of finding the Created time stamp of...

View Article


Search for ISOs across all datastores, excluding those 'Inactive'

Hello! I am running into an issue when searching for ISOs. When a datastore is marked as 'Inactive', instead of the script continuing, it is halting on the inaccessible datastore.  dir vmstores:\...

View Article

PowerCli script to update DNS IP

have more than 200 windows vm's on different Vlan and now the scnerio came for us to update new DNS primary and Secondary IP for second nic.. we have 2 nic on each vm.any script to update this settings...

View Article

Image may be NSFW.
Clik here to view.

Invoke-VMScript and multiline scriptText

I'v been playing around with the invoke-vmscript cmdlet. I tried to provide a multiline here-string for the -scriptText parameter, but it looks like this is not working. I want to run a small batch...

View Article
Browsing all 16717 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>