aerodevil's Posts

Sorry for the delayed response.  All of the clones get a prefix of "clone-"  you could potentially use that to have a list for deleting.
You'll note that the example provided on vTesseract.com is done by getting a list from a text file.  You could do similar with a CSV Import-CSV <csvfile.csv> | Select <server-name-field> | Clone... See more...
You'll note that the example provided on vTesseract.com is done by getting a list from a text file.  You could do similar with a CSV Import-CSV <csvfile.csv> | Select <server-name-field> | Clone-List I wasn't able to test this at the moment but something along these lines should work.
Thanks Luc.  Apologies for not seeing this.  Everything else working ok with the function Peter?  If not please let me know and I"ll be happy to help.
Hi Luc, I saw this post w/ Affinity Rules: http://psvmware.wordpress.com/2012/05/14/new-drsrule-unable-to-cast-object-of-type-vmware-vim-clustervmhostruleinfo-to-type-vmware-vim-clusterantiaffini... See more...
Hi Luc, I saw this post w/ Affinity Rules: http://psvmware.wordpress.com/2012/05/14/new-drsrule-unable-to-cast-object-of-type-vmware-vim-clustervmhostruleinfo-to-type-vmware-vim-clusterantiaffinityrulespec/ And messed around with it a bit.  It seems to can do > 2 VMs with Anti-Affinity Rules w/ powershell using this method (don't need the multiple rules for > 2 VMs): $spec = New-Object VMware.Vim.ClusterConfigSpecEx  $spec.rulesSpec = New-Object VMware.Vim.ClusterRuleSpec[] (2)  $spec.rulesSpec[0] = New-Object VMware.Vim.ClusterRuleSpec  $spec.rulesSpec[0].operation = "add" $spec.rulesSpec[0].info = New-Object VMware.Vim.ClusterAntiAffinityRuleSpec              $spec.rulesSpec[0].info.enabled = $true $spec.rulesSpec[0].info.name = "AA-vm1-vm2" $spec.rulesSpec[0].info.vm = (get-vm vm1,vm2|get-view) |% {$_.moref}    (Get-View -Id (get-cluster xyz).id).ReconfigureComputeResource_Task($spec, $true)
I am guessing the password is Stayouttahereallofyounonviguysyoudonotbelomgonoursyatemsallyourbasearebelongtous - Josh Atwell Sent from mobile device. Please excuse autocorrect erro... See more...
I am guessing the password is Stayouttahereallofyounonviguysyoudonotbelomgonoursyatemsallyourbasearebelongtous - Josh Atwell Sent from mobile device. Please excuse autocorrect errors.
I am still not wholly convinced that Luc isn't a robot/cyborg/android etc.
Ahh....It seems I misread/misunderstood the request.  Once again well done Luc!  Learning something new every day
May not be the fastest or most efficient but it was the first way that came to mind. foreach($vm in $vms){ # Check if VM is not in a cluster at all and report If(!(Get-Cluster -VM $vm))... See more...
May not be the fastest or most efficient but it was the first way that came to mind. foreach($vm in $vms){ # Check if VM is not in a cluster at all and report If(!(Get-Cluster -VM $vm)){     $vm | Add-Member -MemberType NoteProperty -Name Cluster -Value "None"     $vm | Add-Member -MemberType NoteProperty -Name DRSEnabled -Value "None"     $vm | Select Name, Cluster, DRSEnabled, PowerState }Else{ # Since VM is in a cluster, check if DRS is enabled and report     $cluster = Get-Cluster -VM $vm     $vm | Add-Member -MemberType NoteProperty -Name Cluster -Value $cluster.Name     $vm | Add-Member -MemberType NoteProperty -Name DRSEnabled -Value $cluster.DrsEnabled     $vm | Select Name, Cluster, DRSEnabled, PowerState } }
PowerCLI has a great cmdlet called Update-Tools and even allows you to upgrade the tools without rebooting. Get-VM | Update-Tools -NoReboot http://www.vmware.com/support/developer/PowerCLI/... See more...
PowerCLI has a great cmdlet called Update-Tools and even allows you to upgrade the tools without rebooting. Get-VM | Update-Tools -NoReboot http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Update-Tools.html
The common Full name is found in $vm.ExtensionData.Guest.GuestFullName
You could use a WMI call in some type of loop: $vms = Get-VM foreach($vm in $vms){ $wmi = get-wmiobject -class "Win32_DiskPartition" -namespace "root\CIMV2" -ComputerName $vm foreach ($... See more...
You could use a WMI call in some type of loop: $vms = Get-VM foreach($vm in $vms){ $wmi = get-wmiobject -class "Win32_DiskPartition" -namespace "root\CIMV2" -ComputerName $vm foreach ($objItem in $wmi){      $offset = $objItem.StartingOffset      #This check says that if there is any remainder then you're not divisible by 4      If(($offset % 4) -ne 0){           Write-Host "$vm is Misaligned"      } } I haven't tested this but I think it will work or at least get you on the right path. You will clearly need admin rights to the VM or modify it to use Invoke-Script Hope this helps or gets you in the right direction.  I am actually working on something similar.
I'd recommend starting with RvdNieuwendijk 's great backup VMX script. http://communities.vmware.com/message/1674574 I've used it in our environment and should provide most of what you need... See more...
I'd recommend starting with RvdNieuwendijk 's great backup VMX script. http://communities.vmware.com/message/1674574 I've used it in our environment and should provide most of what you need.  It will recreate the VM but does not include some information like the disk/vmdk sizes.  Regardless it's a good backup to perform periodically.
No problem. This one works fine just copying and pasting it into your PowerCLI window.  I do recommend making sure you connect to your vCenter server first and setting the path and filename wh... See more...
No problem. This one works fine just copying and pasting it into your PowerCLI window.  I do recommend making sure you connect to your vCenter server first and setting the path and filename where you would want it. You can also store this in a .ps1 file and dot source it.  It would look like this in your console. xxPowerCLI> . 'C:\Path\To\PS1\script.ps1'
Pretty sure this will do what you need: $report = @() Foreach($cluster in Get-Cluster){     $datastores = $cluster | Get-VMHost | Get-Datastore     foreach($datastore in $datastores){   ... See more...
Pretty sure this will do what you need: $report = @() Foreach($cluster in Get-Cluster){     $datastores = $cluster | Get-VMHost | Get-Datastore     foreach($datastore in $datastores){     $vms = $datastore | Get-VM     If ($vms.count -ge 1){         foreach($VM in $vms){         $object = New-Object -TypeName PSObject -Property @{               Datastore = $datastore.Name               VM = $VM.Name               HostName = $VM.VMhost               Cluster = $cluster             }         $report += $object         }         }     } } $report | Export-Csv C:\Temp\VMs.csv -NoTypeInformation -UseCulture If you only want Shared datastores then you could use $datastores = $cluster | Get-VMHost | Get-Datastore | Where {$_.Extensiondata.Summary.MultipleHostAccess -eq $True} Hope this helps
I believe Update-Tools works just the same for v5 as it did for v4.  I have not seen any difference. Don't forget about the wonderful -NoReboot !!
Are the remaining disks very large?  It would probably be easier to hot clone the entire VM and then simply delete the other files. Another option might be to initiate a snapshot on that VM an... See more...
Are the remaining disks very large?  It would probably be easier to hot clone the entire VM and then simply delete the other files. Another option might be to initiate a snapshot on that VM and then perform a copy of the disk that you need cloned.
Is it possible that the variable $arrProblemComputers is set to something else in the session?  I know I came across a similar error today when I was using the variable in two places in the scrip... See more...
Is it possible that the variable $arrProblemComputers is set to something else in the session?  I know I came across a similar error today when I was using the variable in two places in the script.  I changed my script and used Clear-Variable to make sure there was no value assigned for that session.  Just a thought. Example: Clear-Variable arrProblemComputers
Have you checked out this post? http://communities.vmware.com/message/1990303#1990303 Conrad (crad14) has some impressive logic he's using in his Upgrade Datastore script.
If you are looking to place data that you get from PowerCLI onto a web page there are a couple of ways you could consider doing it. Use ConverTo-HTML cmdlet.  Check out get-help  converto-html ... See more...
If you are looking to place data that you get from PowerCLI onto a web page there are a couple of ways you could consider doing it. Use ConverTo-HTML cmdlet.  Check out get-help  converto-html -full for usage and examples. You can always place the results into a .txt file and store it on a web server.  We use this method a lot and it allows you to later import that content pretty easily.  We came across a snippet that made getting info from a web page pretty easy.  I'll see if i can dig that up again and will post it.
Well rest assured about Orchestrator and your budget.  It's FREE with vCenter server!!  <Edit:  Saw your edit but had to post that line!> It can definitely be achieved though may take some time.