Exporting vROps reports continuously using PowerShell

January 5, 2019 Kim Bottu 3

You may come across situations where it makes sense to export vROps reports (continuously) using PowerShell instead of using the build in solutions. There is a very good blog article about how to leverage PowerCLI to extract vROps reports, which you can find here. A huge thanks to @_ryanjan_ for sharing this information and to create and share the excellent helper-module. However, when trying to do export reports using PowerShell, I faced some problems: The report id changes, so we need a variable for that. The exported report must change name each time it is being exported, or any following export will try to use the same name of the report that is already there. This is especially needed when […]

VMworld Barcelona 2018 #Hackathon H4CK 4 C3N73R #RussianRoulette @kmruddy @vmwarecode @VirtualG_UK @Dark_KnightUK

November 17, 2018 Bilal Ahmed 0

So I had the pleasure of attending the hackathon at VMworld and meeting @kmruddy and the mighty beard! So I was asked to join up with Graham Barker @VirtualG_UK and David Taylor (WHO DOES NOT HAVE A TWITTER ACCOUNT) David how can you be a guy that travels around the world for Dell EMC on projects and not even have a Twitter account, you should be ashamed of yourself! They had an idea, that to me was super interesting. They were using VMware Workstation 15 with the new REST API bits, along with PowerCLI to create a quiz. After discussing the idea with them, I came up with the idea of it being called Russian Roulette. In VMware Workstation there was a […]

Storage vMotion Thin to Thick Lazy Scripting #vExpert #PowerCLI #PowerShell #vSphere

August 29, 2018 Bilal Ahmed 1

Well hello, there party people! I recently came across an issue where the customer had just configured alerting to look for Thin Provisioned VMs, and to my and their dismay it came back with over 300 VMs across 2 sites in staging and production that were like this. Now they have Dell Compellent SANs and these Thin Provision at the storage layer too, so it was basically thin on thin! Now the key points here were: Let’s figure out why this happened Let’s fix the issue for the currently deployed VMs and for future deployments Now we did some digging and it appears the Devs and their automation scripting were the cause of the issue. In their scripts, they had it […]

PowerCLI: the easiest way to create Private VLANS

May 26, 2016 Kim Bottu 0

If you like to test PVLANs but don’t like clicking around in the webclient, try creating them from PowerCLI. The Primary VLAN in each line is always the same one and in your first line, the primary and the secondary VLAN are the same VLAN. This is because the primary PVLAN will also serve as the Pormiscuous PVLAN. I have chosen 200. On the next lines the Primary and Secondary VLANs are different from eachother. $vds = Get-VDSwitch ‘Your vDS’ Get-VDSwitch $vds | New-VDSwitchPrivateVlan -PrimaryVlanId 200 -SecondaryVlanId 200 -PrivateVlanType Promiscuous Get-VDSwitch $vds | New-VDSwitchPrivateVlan -PrimaryVlanId 200 -SecondaryVlanId 201 -PrivateVlanType Community Get-VDSwitch $vds | New-VDSwitchPrivateVlan -PrimaryVlanId 200 -SecondaryVlanId 203 -PrivateVlanType Isolated  

PowerCLI: backup and restore an array of ESXi hosts

May 14, 2016 Kim Bottu 0

The following script makes a backup of the ESXi Host configuration file for an Array of Hosts in a folder on your Management station in C:\BackupMeUp. If you run the backup task multiple times, it will overwrite the saved configuration files for the hosts it already contains a configuration file for. Backup an Array of ESXi hosts Write-Host “Backing up ESXi config to C:\BackupMeUp” $vmhost_array = @(“esxi1.mydomain.com”) foreach ($vmhost in $vmhost_array) { Get-VMHostFirmware -VMHost $vmhost -BackupConfiguration -DestinationPath C:\BackupMeUp } Write-Host “Backup is completed!” The following script restores the host configuration from the folder on your Management station C:\BackupMeUp for an Array of Hosts. Make sure that you know which hosts it will restore, and that you modify this in the […]