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

79 questions
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,807
  • 13
  • 64
  • 106
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
  • 339
  • 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
  • 339
  • 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
  • 339
  • 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
  • 339
  • 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,238
  • 5
  • 30
  • 39
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
0
votes
1 answer

How to obtain VMWare ESXi logging from Vsphere?

How to obtain VMWare ESXi log and store it in our local machine? Can it be acheived using VMWare powerCLI? ( I hope in log file i can get what are all the guest machines were utilized and how long . Is it true?)
Samselvaprabu
  • 1,311
  • 5
  • 13
  • 26
0
votes
1 answer

How to maintain the list of VM in case free ESXi?

In our company we do not have licensed ESXi. I am having 10 ESXi server and using Vsphere to connect each and every machine. Whenever i am giving machine to users i store few information in excel like follows IP_Address |VMName |GivenTo| Os|…
Samselvaprabu
  • 1,311
  • 5
  • 13
  • 26
0
votes
2 answers

When a VM Template was last used (to create a VM)?

I need to know when a VM Template was last used (to create a VM)? As I am working on a project of segregating unused templates in my vSphere environment, I need to know that answer. I tried Get-Template TemplateName | select * But is not giving me…
0
votes
0 answers

set-vm(guest customisation) : The operation for the entity "x" failed with the following message: "A specified parameter was not correct: hostname

(powercli newbie here) I am using guest customisationscript that needs hostname when creating vm. Using that in powercli fails $New_vm=get-vm "ies-jtmpl-t005" $OSSpecs = Get-OSCustomizationSpec -Name 'jayan_debug' Set-VM -VM $New_vm…
Jayan
  • 141
  • 1
  • 5
  • 14