Folder totalizing
Hi guys,how can I implement the sum of CPU and Memory in this script. $report = @()Get-Folder -Type VM |ForEach-Object -Process { $row = '' | Select-Object Folder, VMCount, ProvisionedSpace,...
View ArticleLooking to query multipe vCenters to identify if Cluster hosts are configured...
I'm looking to to query multiple vCenters and each's associated clusters to identify which clusters are configured with vSS or vDSs with an outputted CSV file similar to: | vCenterName | ClusterName |...
View ArticleGet hosts using vSphere licenses
Hi, I have the code below which tells me the vCenter, the name of the key, the license key, the total number of licenses per key and the total used. However, I'd also like to see which hosts are using...
View ArticleWARNING: Parameter 'VM' is obsolete. This parameter no longer accepts...
When running the script below #import list of servers from text file$Servers = Get-Content -Path “c:\VMlist.txt” # Take snapshot of each vmforeach($Server in $Servers){Get-VM -Name $Server |...
View ArticleSet-VM -hardwareversion v13 fails with "the operation is not supported on the...
We're behind some firewalls that make Nuget impossible. We were able to get PowerCLI 11.2.0 installed by an offline process, coping the folders to the modules directory, and that works well for almost...
View ArticlePowerCLI script to rename the guest OS hostname on Mac OSX?
So I have a thread posted here vRA 7.5 and Apple OSX blueprints and I'm not getting any answers, so I'm wondering if there's a way to run a script like this: PowerCLI: Rename Windows Guest OS Hostname...
View ArticleSchedule Snapshot with PowerCli
Hi All, I there any way to use PowerCli to schedule a snapshot? I'm looking to built a script to take user inputs such as Vm name, snapshot name, snapshot date, etc. to schedule a snapshot. I'm hoping...
View ArticleAnswer types
What do you expect from an answer to your question(s) ? Should it be code that a beginner understands or code that provides the fastest solution in a large vSphere environment ?
View Articleproblem with new-vm
Hello.At my company we are trying to automate the process of creating new virtual machine.Little background of the application:I created a asp.net website which just asks things like network, vm name,...
View Articlevcenter Cluster report
I am looking for a script to run against the vcenter to generate the following table send it in email body (if not possible in body than as attached csv)...
View ArticleCopy-VMGuestFile - The 'propSet' paramter should not be null. Error
Hi All I have been struggling to get the Copy-VMGuestFile and Invoke-VMScript commands to work in our environment.I have tried everything on all the forums and scoured the internet. Below is a list of...
View ArticleCan we get the Snapshot age ?
Hi All, Can we get the Snapshot age for more than 5 days ? thanksvmk
View ArticleNeed help with error
All, I have one basic script to connect vcenter and poweroff all VMs, two days ago when i ran this script i received below error on powershell window. If i understood correctly, Stop-VM command was...
View Articlevirtualmachinelocks_powercli
Hi Luc/All, is there any powercli way of checking locks on virtual machines??
View ArticleRename multiple VM's using txt file
I am looking for a PowerShell/PowerCLI script/way to rename 180 (only the display name not the vmdk/vmx files) vm's located in txt file under C:\Temp\vmlist.txt. Is there a way to do it better then...
View ArticleGet-TagAssignment operation causes Disconnect-Viserver to hang
Ourbackup software uses the tags we assing in vSphere to schedule backups/type. One drawback of this is that sometimes adding a VM to backups is forgotten I have written a small script using...
View ArticleDefaultVIServer -match -notmatch bug ?
Hello Community, I recreate my topic after some research. First of all I'm working on a CentOS7 with a PowerShell 6.7 package & a PowerCli 11.0.0 module. I've been through an issue with my powercli...
View ArticleHow to total DataStoreCluster Capacity and FreeSpace not individual DataStores?
I have seen several examples of generating a report that list the CapacityTB and FreeSpaceTB for a individual Datastores within a DataStoreCluster, but I cannot determine how to just generate:1. The...
View ArticlePowerCLI not connecting to vCenter in another domain
Hi All,I am facing an issue with powercli, one of the Vcenter with different domain is not connecting via powercli.getting the below...
View ArticleIs it possible to change both host and datastore on powered-on VM using...
I have a requirement to perform online migration of 100+ Powered-on VMs from one cluster to another without shared storage. I know that we can do it through Web-Client, but is it possible using...
View Article