Questions tagged [powercli]

VMware PowerCLI is a command-line and scripting tool built on Windows PowerShell

VMware PowerCLI is a command-line and scripting tool built on Windows PowerShell, and provides more than 600 cmdlets for managing and automating vSphere, vCloud, vRealize Operations Manager, vSAN, NSX-T, VMware Cloud on AWS, and VMware Horizon environments.

Resource for Downloads and Documentation and Reference

83 questions
0
votes
1 answer

PowerCLI Get-EsxCli Type Conversion Error

On three different servers, and one desktop, using PowerCLI 10, I am unable to call any of the EsxCli invocations, getting instead: > $esxcli = Get-EsxCli -VMHost "host.f.q.d.n" -Server (Connect-VIServer "server.f.q.d.n" -User "username" -Password…
SmithPlatts
  • 121
  • 4
0
votes
0 answers

Powercli Build and install VM from ISO

I assume this would be easy. However i cannot get powercli latest to mount a cd with an iso and boot from the ISO to install the OS(windows). $NewVMParams = @{ 'VMHost' = 'MyESX1' 'Name' = 'TestMount_Auto' 'Datastore' = 'VMFSLun01' …
mikedopp
  • 229
  • 2
  • 7
  • 16
0
votes
1 answer

Queue VMware Virtual Machine vMotion using powercli

I wrote this quick Powershell script where it queues vMotion of VMs and runs only 4 vMotion tasks at a time. I thought this might help someone, so you are free to modify the code as per your like. We were moving VMs to 2 different datastore for a DR…
LT-
  • 111
  • 1
  • 4
0
votes
1 answer

Get actual usage of VMDK on SAN

I have a script that retrieves details for all VMs in my vCenter Cluster. Essentially Get-VM | Get-Harddisk. I can also get the Provisioned Space and Used Space values, but these are only for the VM as a whole, and I'd like to get this per VMDK file…
neildeadman
  • 684
  • 4
  • 20
  • 34
0
votes
1 answer

PowerCLI transfers a file but the copied file size is way too small. What is wrong?

I am using PowerCLI version 6 on a Windows server with 20 GB of free space. I am trying to use copy-datastoreitem with PowerCLI. It seems to work to transfer a .vmdk file from an ESXi datastore to the Windows server that has PowerCLI. There are…
Kiran
  • 67
  • 4
  • 10
0
votes
1 answer

Does PowerCLI have PowerShell Profiles?

Powershell has profiles that you can use to load functions you've written when your shell loads up. Does PowerCLI have a similar functionality?
leeand00
  • 4,869
  • 15
  • 69
  • 110
0
votes
2 answers

vCenter Thin Provisioned disk usage calculations

I'm managing a number of Thin-Provisioned VMs in vCenter 5.1.0. Each contains one virtual Harddisk. We run a pretty tight ship in terms of allocating storage, so the difference between 1 or 2 GBs is relevant for us in making storage decisions. I'm…
0
votes
1 answer

How can I get VMHost's operating system and serivce pack info using Get-VMHost

I am trying to get the VMHost operating system info , but I can not find the required scripts. I tired this :- Get-VMHost which return a lot of info about the VMHost,, but the operating system info is missing. can anyone advice how I can get the…
John John
  • 379
  • 1
  • 4
  • 12
0
votes
1 answer

Unable to connect to server using its name "Connect-VIServer "

I wrote the following PowerCLI command to connect to a server by its name :- Connect-VIServer -Server "t***.v****ces.intra" -User root -Password "*****" but I got the following error:- Connect-VIServer : 07/08/2015 13:11:54 Connect-VIServer …
John John
  • 379
  • 1
  • 4
  • 12
0
votes
1 answer

Connect-VIServer will always propt a dialog to enter username & password

I rung the following command inside powercli 5.5:- PowerCLI C:\> Connect-VIServer -Server 172.16.20.101 -User root -Password **** but I got a dialog to enter username and password although I am supplying the username & password in the script -User…
John John
  • 379
  • 1
  • 4
  • 12
0
votes
1 answer

Using PowerCLI Versus using asp.net WMI to scan and retrive informaion about ESX hosts

I want to scan and view information about ESX hosts which have "ESXi 5.0 Update 1" as their OS inside my asp.net web application. mainly to be able to retrieve the ESX specification and all the vms that are inside the ESX. where all the VMs are…
John John
  • 379
  • 1
  • 4
  • 12
0
votes
1 answer

Reload VIAccounts list with PowerCli to select a newly created group

I'm using a script that creates groups in Active Directory, and links them to my vCenter server using New-VIPermission. The trick is that it doesn't find the groups created unless I restart the script (and so, I guess, the connexion). $My_Group =…
0
votes
1 answer

finding guestid in offline documentation?

I have a little question thats been bugging me lately. I am using PowerCLI to create a new VM and I want to use the -guestId parameter to specify the Guest OS. Is there any built in documentation that lists all the available Guest IDs? It would be…
Jake
  • 2,268
  • 5
  • 30
  • 40
0
votes
2 answers

Snapshot Reporting via Email

I've got the current script that is supposed to log onto vsphere, get all snapshots that are over a week old, and email the results. Connect-ViServer server $weekOldSnapshots = (Get-Date).AddDays(-7) $smtpSrv = "name" $from = "email" $to =…
Valrok
  • 330
  • 3
  • 11
0
votes
1 answer

Method of obtaining SCSI hardware on all virtual servers

I'm looking for a method to check what the SCSI hardware of a VM is and identify any servers that have virtualbuslogic. I'm trying via PowerCLI to make this happen although I'm not sure how to specify that I want to see just the servers with…
Valrok
  • 330
  • 3
  • 11