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

Image may be NSFW.
Clik here to view.

Failed to cancel update tools task and stop-vmguest max tries failed

Hi LucD, After adding timeout in Update-Tools task and stopping the VM with multiple tries the below script was executed on 15 templates and waited for 72 hrs but script never completes even though...

View Article


Image may be NSFW.
Clik here to view.

Getting VM creation date timestamp from VCenter database?

Hi All, I'd like to get the date and time where the specific VM was created.How can I do this on the latest VCSA 6.7 Product: VMware vCenter Server Appliance 6.7Product version:6.7 U3h - 16275304 using...

View Article


Invoke-VMScript

hi,I am trying to run the invoke command to scan for new disk and add them to the vm, but somehow this is not working, i know the script text works. please help $createDisk=@" $disks = Get-Disk...

View Article

Properties similar to "Get-AdvanceSetting" of a VM in Get-View

Are there properties available in Get-View that are similar to Get-AdvancedSetting|Where{$_.Name-like"*tools*"} The below cmdlet is able to give me these specific info related to vmtools of a VMget-vm...

View Article

Add a VM to a vApp using PowerShell

Hello, I am trying to add a VM to a vApp using PowerShell.  I know that there is no explicit cmdlet to do it, and I need to recompose the vApp. I've used the great Instantiation script from...

View Article


ESXi host Network Storage Health checkup report

Hi All Can you please suggest if we can get powercli script to generate ESXi host Network and Storage health checkup report via vCenter server. Thank you RegardsNarayanan.

View Article

Script to send output in email

Hi All,It could be a simple, am not powercli expert. i was looking for a script to send the below commands output in email. the output content should send in email. The command will give us the list of...

View Article

Rename and Backup VM vmx file

Is there a way to rename a vmx file by appending a string to the vmx filename in the same VM folder? PS C:\>(Get-VM TestVM).ExtensionData.Config.Files VmPathName          : [vSAN-Compute-Cluster]...

View Article


PowerCli getting error

Command $Clusters = Get-Cluster -Name Name of the Cluster [This is working fine]$allNodes = $Clusters | Get-VMHost [This is working fine]$allVMs = $Clusters | Get-VM [This is not working and getting...

View Article


Exclude vms in Get-View

Hi guys, I customized a VM Inventory script for my requirement by coping some of the LucD scripts . Its working fine. But now my doubt is I need to exclude the vms named "replica". But I dont  know...

View Article

Get Guest OS Disk Space

Hi, I'm trying to get the stats on disks within the VM Guest OS. The script I have below kind of works, but some of the results are outputting to the CSV file as System.Object[]. What am I missing...

View Article

script add vm logrotate Size ="10240000"

anyone have the script for this add this to all the vm  logrotate Size ="10240000"  add another line rotate =3  please let me know thanks

View Article

Define a folder for Cloned Machine in vCenter using PowerCLI

Hi All,I am trying to automate the Clone of VM creation through PowerCLI. I would like to have the cloned machine stored in a different folder in vCenter, how do I define that.I didn't get any help...

View Article


adding server to domain using invoke-vmscript

i am trying to add servers to the domain, but with no luck,  i tried to concatenate the  command and still no luck i appreciate your input on where i am going wrong  $vmname="testdomain.xyz.com"...

View Article

Unable to connect to remote server | Export-VM

We are trying to export the VM in ovf format using below snippet. The operation starts for a brief time and then we get error saying "Unable to connect to remote server"Get-VM -Name "vmname" |...

View Article


Image may be NSFW.
Clik here to view.

Checking if VM exist from CSV

Hi, Thank you LucD for the help and guidance with setting up scheduled task time/date base don the local time zone(work nicely see below).  I am now trying to add an exist at the beginning to let us...

View Article

get-cluster

recently I have installed latest poweCLI module, when i issue get-cluster against vcenter 4.5 and 5.1 it says not supported for get-cluster, is there any way to solve the issue without downgrade?...

View Article


How do you add an existing rdm to a VM using New-HardDisk?

Hi,    I'm running powercli 5.0.1 build 581491 and i'm trying to write a powercli script to: 1) create an RDM2) assign that RDM to VM13) assign the same RDM to VM2 I'm able to create the RDM and assign...

View Article

PowerShell to remove Advanced Setting

Powershell to remove the Advancedsetting value item on single vm.  thanks  

View Article

finding .iso files in all datastores in vcenter_powercli

Hi Luc ,if you can check the followingi am looking to check each datasore for .iso file .i dont think there is direct way of doing this .can you please check the folowing script if this works fine ??...

View Article
Browsing all 16717 articles
Browse latest View live