The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
7 views

Powercli Script to measure the count of Host and its Vm's in a each clusters

I am trying create a on-liner script which gives an outputs of Hosts and vm's counts in a vcenter cluster like as below. Cluster: VMHost ...
1
vote
0answers
6 views

Vm counts by folders

I have created a script which collected the VM counts for the selective folders in each Vcenter, This scripts seems working fine but it's not collecting output to the CSV. $output = @() Get-Content ...
0
votes
1answer
82 views

Trouble with embedding html email with PowerCLI/Powershell for gmail

I am new to Powershell, I am a junior admin for a VMware environment. I am trying to automate a weekly report for snapshots in PowerCli. I am making the script in Powershell. I have made a simple ...
1
vote
0answers
61 views

PowerCLI automation set-cddrive error

When attempting to change ISOs on a powered on guest instance, set-cddrive is returning an error but completing the command. A couple different commands produce the same result: $theVM | Get-CDDrive ...
0
votes
0answers
167 views

PowerCLI Move-VM Returns failure but vm still moves

I have a script that is moving VM's from one datastore to another. I have other logic to protect the Storage backend and fabric from over subscription and to wait to submit new requests at specific ...
1
vote
1answer
431 views

How do I open the VMware Remote Console (application) from the PowerCLI?

A recent update to ESXi in our environment added a feature, "Open with VMRC". This works outside the browser, and as the method of accessing the console that functions inside the browser hasn't ...
2
votes
1answer
215 views

ESXi 5.5 hosts have multiple HostDateTimeSystem entries

I've been trying to do an audit of time skews on some of my hosts recently. Using PowerCLI I found a few scripts that reference the ConfigManager.DateTimeSystem to get the ESXi Host datetime. ...
9
votes
2answers
2k views

ESXcli command timeout at 30 minutes

I am working on a powercli script to loop through each datastore in our environment and reclaim space on the thin provisioned LUNs. All LUNs in the environment are Dell Equal Logic. vCenter ...
0
votes
1answer
126 views

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 ...
0
votes
1answer
411 views

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 ...
2
votes
0answers
121 views

vmware thin disk usage powercli

I want to ask a question about thin provisioning. get-vm commandlet can easly give us real space used by a vm totally. Assume that you have a virtual machine which has more than one thin disk. If ...
0
votes
2answers
87 views

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 = ...
5
votes
1answer
468 views

Checking partition alignment with PowerCLI

I'm trying to verify that the file system partitions within each of the servers I'm working on are aligned correctly. I've got the following script that when I've tried running will either claim that ...
1
vote
2answers
347 views

Gathering buslogic SCSI hardware and virtual machine operating system

I'm trying to use Powershell to get SCSI hardware from several virtual servers and get the operating system of each specific server. I've managed to get the specific SCSI hardware that I want to find ...
0
votes
1answer
43 views

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 ...
1
vote
1answer
114 views

How do I create an IP Pool using PowerCLI?

Datacenter objects have a tab "IP Pools" to create IP pools for vApps (as I understand it). How can IP pools be created or modified using PowerCLI?
1
vote
1answer
2k views

Delete all snapshots over 30 days old

I'm currently using VMware 5.1 and looking for a method to keep snapshots that users create from becoming too old. Is there any tool inside of VMware that allows you to manage snapshots (or possibly a ...
2
votes
3answers
325 views

Is it possible to add root ssh keys to /etc/ssh/keys-root/authorized_keys on ESX hosts without having to log into every box?

I have close to 70 ESX hosts that need to have the root SSH keys added to them. Is there a way to do this through vsphere or powercli, or will I have to manually SSH into each box and add the line to ...
1
vote
3answers
382 views

'exit status' of a powershell pipeline

How do I check for the success/failure of a pipeline from within the same executing script? Get-VM -Name Machine | Get-Snapshot | Where {$_.Created -lt (Get-Date).AddDays(-1)} | Remove-Snapshot ...
0
votes
2answers
2k views

How can I get triggered alarms using PowerCLI?

In vSphere Client on a VM host in the Alarms tab there is a view of Triggered Alarms. How can I get those alarms using PowerCLI?
1
vote
2answers
672 views

PowerCLI: How can I find an ESXi host's system memory?

A view of a VM host gives me the field .Config.ConsoleReservation, but ESXi doesn't have the console any more. The vSphere GUI shows total memory and system memory for ESXi hosts. How can I get an ...
1
vote
1answer
885 views

Resetting the VMware PowerCLI global:DefaultVIServer and global:DefaultVIServers system variables?

Can anyone here please assist me in resetting the global:DefaultVIServer and global:DefaultVIServers system variables into $null ? because I cannot do anything with my PowerShell anymore even after ...
1
vote
1answer
2k views

VMWare 5.1 Datastore in use when trying to unmount?

When trying to unmount a datastore from one of my 4 ESXi hosts, I receive a message that it's in use. The full error stack I see is: Call "HostDatastoreSystem.RemoveDatastore" for object ...
2
votes
1answer
5k views

Query ESXi memory slots/installed memory modules from PowerCLI 4.1

I have a VMware infrastructure with some ESXi 4.1 hosts and a vCenter Server 5.0 installed. I need to extend our hardware inventory with the following info: how many memory slots are available in ...
0
votes
0answers
232 views

Querying boot order with powershell in vsphere

We have any environment with thousands of virtual desktop hosted on a vshpere hypervisor. I'm looking for a way to check the boot order in the bios of each vm to ensure they all are set up properly. ...
1
vote
0answers
130 views

PowerCLI: cancel all taks for current user

I would like to create a PowerCLI script that cancels all tasks initiated by the current user. I haven't been able to use Get-Task or a filter to get only my tasks, as I haven't found that property on ...
2
votes
0answers
478 views

Setting a VM boot CD via PowerCLI

I have a sneaking suspicion that this may be a bug, but I'm definitely willing to entertain the possibility that I'm doing things wrong. I have a VMware virtual machine in $vm, and I'm trying to ...
5
votes
3answers
34k views

VMWare ESXi: how to add network drivers to installation?

Background / Problem I have two new servers (Dell R720 & Dell R520) that I plan to install ESXi onto. During the VMWare Hypervisor installation, I'm told that no network adapters exist. Upon ...
1
vote
1answer
91 views

Scripting changes to the vNIC in vSphere for a cloned VM

After deploying a Windows VM clone from a template, how can a script be written to change the network the vNIC is on ("Network label" in the VM Settings window) and enable the NIC? I'm working with ...
4
votes
1answer
597 views

Modifying the number of VCPUs in a VMware VM

In ESXi, what is the automation/script (I expect it would be using PowerCLI somehow) approach to modify the number of VCPUs in a VM? In context, when using our kickstarts, RHEL won't install the SMP ...
2
votes
1answer
7k views

Get Used rather than Provisioned space in PowerCLI

I'm trying to run a capacity report, and when I run the Get-HardDisk cmdlet in PowerCLI, the value it returns for CapacityKB is the Provisioned space. For example, let's say I've thin provisioned a ...
4
votes
1answer
11k views

How do I shutdown the Host over ssh on ESXi 5 so it shuts down the guests properly?

I have ssh login to an ESXi 5 host. All the guests have vmware tools running, so they can be shut down by the host properly. I would like an equivalent for this menu option in vSphere client: It ...
0
votes
1answer
1k views

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 . ...
0
votes
1answer
190 views

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 ...
3
votes
4answers
891 views

How to prevent taking snapshots after threshold in VMware ESXi?

We have given our users privilege to take snapshots. But now it is uncontrollable and people started taking meaningless snapshots and never deleting it. Due to this we are facing performance issue, ...
1
vote
1answer
186 views

ESX + Sysprep.inf + Template= unhappy computername

I am trying to create a template in ESX that I can automate with PowerCLI. Everything works great so far, but because I have some specific settings, I had to create my own sysprep.inf. Now, the ...
3
votes
1answer
2k views

PowerCLI - add shared hard disk to vm, using existing scsi controller

I would like to add a shared virtual disk to a second VM which is already attached to a first VM. They will have shared access to the disk, via SCSI controllers set to virtual bus sharing. This works ...
3
votes
4answers
1k views

PowerCLI: Run commands in virtual-machine

We have several view-desktops and I need a script to be performed once on all desktops. Sadly, WMI is disabled. These desktop are all running Windows XP SP3 I thought I read about the possibility to ...
3
votes
2answers
601 views

Encrypt powershell Credentials (creds) files

I have started to play around with PowerCLI and therefore created a credentials file to use when I connect to vCenter. The purpose for this will be to run scheduled tasks, such as running the vCheck ...