Get-view excluding a cluster?
I've searched around for this but am not really finding anything this specific. I'm running a nightly export similar to this: $TestWinVMList = @() # Get all VMs | Keep only PoweredOn | Iterate over all...
View ArticleSimple script that exports to csv listing all the custom annotations
I would like to use export-csv in a simple script listing the machine name and all of its custom attributes. I have tried a couple of ways, but they list the server name 8 times, with the annotation...
View ArticleFind vcenter from VM object
Hi All,Just upgraded to VMware PowerCLI 10.1.0 build 8346946 and i'm finding that i can no longer find which VC my VMs are now in (i am querying 3 VCs). If i put the VM object into a variable I was...
View ArticleCopy-VMGuestFile - Error while trying to copy file from host to VM
I’m trying to use the following command to copy file from host to VM: Copy-VMGuestFile -Source "$TestFilePath" -Destination "$DestinationPath" -LocalToGuest -Force -VM $Machinename -GuestUser...
View ArticleHOW Make "VM GUEST DISK SIZES Script " export CSV file
hello everyone I want to export the following script as a CSV file. Original :ForEach ($VM in ( Get-VM |Get-View)){($info = $VM.Guest.Disk |Select @{N=“Name“;E={$VM.Name}},DiskPath,...
View ArticleScript to get pools, snapshots, and parent image
Hello all! I'm trying to use view powerCLI to get: All poolseach pool's snapshoteach pool's parent/master image. So far, using get-hvpool display very generic information. Using get-hvpoolsummary will...
View Articleget-view filter by vcenter and datacenter
how do I combine get-view by both datacenter and virtualmachine? get-view -viewtype datacenter -filter {Name="DC1"} Get-View-ViewTypeVirtualMachine -filter {Name="test"}
View ArticlevCenter Infrastructure inventory
Hi All, I need a automation script where I can pull-out the vCenter inventory from all ESXi Servers and respected VM's like "IP, HostName, Ram, HardDisk Size, CPU, OS name and version, for all the...
View ArticleCreating a VM from template doesn't use template settings/disks
I am trying to use PowerCLI to deploy multiple VMs from a template in vSphere 6.0.0, and when I attempt to do this, the machine that is created does not appear to use the template at all. The template...
View ArticleError : Application location is untrusted. Copy file to a local drive, and...
Hi All, I am getting the below error when I run the script script : get-process | Write-Output *>&1 | tee ".\Disk_Extend_Log_$date.txt" | out-host Error : Application location is untrusted. Copy...
View Articlescript to call other script when no tasks running in vCenter
Hi All! I try to make a script when it detects that in vcenter Server there is no task running, call another scrip and run it, and if not meanwhile wait for the tasks to finish running and so once the...
View ArticleHow To use variable in filename
Hi All, filename giving error when used with multiple variable $Today = Get-Date -format dd-MMM-yyyy-HH-mm-ss-tt$serv = "myserver"$filename = ".\"ExistingTranscript_ + $serv + _ + $Today".txt" get-vm |...
View ArticlevSAN Configuration report
I am working on a script to report on all vSAN disks/diskgroups etc. and I'm trying to add one field and I can't find a decent way to do it.I want to add which HBA a vsandisk is attached to, to ensure...
View ArticleSyncronize "tags" between vcenter servers
Maybe someone already have a solution for this, so I will ask here before I pull all my hair out. In one of our vcenter we started using tags a while back. Looks like that is the way we want to go, so...
View Articleget-pool not recognized as a name of a cmdlet
Hi Team, Here my conf : - VMware PowerCLI 6.5 Release 1 build 4624819- VMware vCenter Server Version 5.5.0- ESX Version 5.5U3 (3029944) I want to make a script with PowerCLI modifying the power policy...
View ArticleAdding 2 SCSI controllers and multiple shared disks to 2 servers - powercli -...
Hi there, I'm trying to build script to automate the creating of some clusters (Ora RAC). I can build the VMs and add 2 controllers to each node but it fails to add any of the required disks. I've...
View ArticleTrying to filter with multiple tags using "Get-VM -Tag" command
Hi everyone - I'm trying to run "get-vm -tag" and filter by using multiple tags.So for example, let's say I'm connected to 2 vCenters with powercli. We have 2 categories with different tags. Let's...
View ArticleDeploy Multiple VMs to vCenter
This has probably been addressed before, but I cannot seem to find an answer. I am trying to deploy VM's to a VCENTER Cluster, with PowerCLI using Shawn Masterson's script. I am having trouble getting...
View ArticleLive Migration of VM from Windows Based vCenter 6.5 to vCSA 6.5
Hello Experts, Urgent Help Required !! We have a situation that we need to migrate VMs without Downtime from Windows Based vCenter to vCSA 6.5. Thanks in Advance. -Harjit
View Article