PowerCli help needed - total size of VMDKs provisioned
Hi guys, I need a script to generate a csv report for each VM in vCenter listing the total size of the vmdks provisioned to each VM based on the name of the datastore where the VMDK resides. Some of...
View ArticleFinding who created a vm
Hi thereI'm using the below to find the creator for a single vm but running into a syntax issue. Can you please assist me in resolving the issue. Get-VM-NameDCPLMS01 | Get-VIEvent-TypesInfo |`Where {`...
View ArticleSearch for ISO files in all NFS datastores bypassing the .snapshot folders
Hi, Anyone has a tip on how to search all NFS datastores for an ISO files bypassing the ".snapshot*" folders.What I had tried:"dir -Recurse vmstores:\ -Include *.iso | select...
View ArticleOne Liner to pull Storage Usage
I have a quick one liner that pulls the space used on each DS and the # of VM's. Im looking to add the cluter to this but cant seem to figure it out.... Id like it to run against vsphere and pull the...
View ArticleConverting script to HTML...I just can't seem to get it....again
I'm trying to convert a report to HTML, and I just can't seem to understand when I need to convert these objects. I know the basic ConvertTo-HTML cmdlet, and I've posted up questions before and...
View ArticleHelp me complete this command please
Hi, I am trying to create a new VM property that will have a value for that property based on the vcenter server name: New-VIProperty-NamevCenter-ObjectTypeVirtualMachine` -Value...
View ArticleScript to Automate Zero Out of Disks
Hi All, Was hoping to get some help here as I struggle with PowerCLI when it relates to automating multiple objects. We need to be able to zero out multiple vmdks with one script.These VMDK files will...
View ArticleI'm on an HTML roll, but I have a general question.
I have a report gathering various information about ESXi hosts. For the most part, everything is working, except there was one area that gave me a problem at first. $Report.WWN = $VMHost |...
View ArticleHow do I tell which connected server is vCenter?
I'm using PowerCLI 5.0.1 and I have a scenario where a user is connecting to some ESXi hosts and a vCenter Server. My script knows it's connected to some servers, but it doesn't know which one is...
View ArticlePowerCLI get-connectionbroker Not Authorized for additional user
Hi All, We're running vSphere 5.1, with Horizon View 5.2 and PowerCLI 5.5r2 on a Win 2k8R2 box and everything was rosey until we tried to run PowerCLI cmdlets as a user other than the one that...
View ArticleGet-IScsiHbaTarget -Address xxx -Type Send | Remove-IScsiHbaTarget
Hi, I need to get rid off some old conf from some of the cluster & in that some host where iscsi settings exits. I am talking about the - Configuration tab - storage adapter - software or hardware...
View ArticleUsign PowerCLI to set Virtual Machine Console Options for Remote Users
I really miss onxy.... Such a wonderful tool. I am looking for a script to change the Virtual Machine Console Options for Remote Users as documented here: vSphere Documentation Center Anyone have a...
View ArticleInstalling Software via Invoke-VMscript
Hey guys - Here is the situation I'm running into. I have multiple VMs being migrated to a new version of ESXi - these VMs have older tools on them. What I'm doing is once the machines live on the new...
View ArticleCan someone help me output this script in a csv file
Hi Guys, I'm just new in scripting and need a little help.Can someone help me add additional info on the script below. 1. Total number of VMs per ESX host2. Output the results in a csv file. $myCol =...
View ArticleGet-VM | Multiple vCenter | Search Order
If I am connected to multiple vCenters and I do a get-vm it searches all vCenters. In what order are the vCenter's searched and when the vm is found can it return the vcenter it was found at? Is there...
View Articlescript to export host with software iscsi apater enabled ? export that info....
Hi All, anyone has a script for 1. export hosts with software iscsi apater enabled ? 2. export that info.3. Disable them4.remove the software iscsi apater All i have so far is PowerCLI...
View ArticleInvoke-VMScript inside Start-Job/ScriptBlock leaves Powershell process...
I have a script that runs Invoke-VMScript from inside a function that starts a new Job with a ScriptBlock and then connects to vCenter with Connect-VIServer and executes Invoke-VMScript. The...
View Articleiscsi : How to remove the iscsi software adapter ?
Hi Can someone guide on how to 1. Remove the software iscsi apater (I know how to disable , also i know removal needs reboot) ( pls confirm is disabling & rebooting does "delete" ? ) 2. How to...
View ArticleGetting filesize for particular files in a datastore
I was wondering if it was possible to get the size for particular files on a datastore. It seems this should be trivial, however I am new to PowerCLI and I do not see any size properties when I invoke...
View Articlehow to retreive the complete child to parent list of vHD either linked clones...
Hi all, I'm looking forward to find a more easy way to retrieve the hierarchy of disk under snapshot or linked clones. I've found the LCTree tool Lctree – VMware Labs but is only usable...
View Article