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

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 Article


Looking 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 Article


Get 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 Article

WARNING: 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 Article

Set-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 Article


PowerCLI 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 Article

Schedule 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 Article

Answer 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 Article


problem 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 Article


vcenter 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 Article

Copy-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 Article

Image may be NSFW.
Clik here to view.

Can we get the Snapshot age ?

Hi All, Can we get the Snapshot age for more than 5 days ? thanksvmk

View Article

Need 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 Article


virtualmachinelocks_powercli

Hi Luc/All, is there any powercli way of checking locks on virtual machines??

View Article

Image may be NSFW.
Clik here to view.

Rename 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 Article


Get-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 Article

DefaultVIServer -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 Article


Image may be NSFW.
Clik here to view.

How 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 Article

PowerCLI 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 Article

Image may be NSFW.
Clik here to view.

Is 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
Browsing all 16717 articles
Browse latest View live