Creating #VMConAWS #NSX-T Firewall Rules and Segments with #PowerCLI

June 6, 2022 Bilal Ahmed 0

Well hello there. I had a customer that was wanting to do some work using scripting to create NSX-T segments and DFW rules in VMConAWS, for their PROD SDDC and for their new VCDR SDDC. Over the years I have seen a lot of people think that copying the VM data and being able to recover is the hard part when that can be the easiest part. Things like VCDR are designed to get your copies of the VMs up and running, but what about the networking and firewall rules you need to ensure communication works and is still secure? So, this ended up being a discussion on the various ways to create rules on both SDDCS and this led […]

Automating HCX Cutover using PowerCLI #HCX #PowerCLI #vExpert

November 15, 2021 Bilal Ahmed 0

So I was provided with a script from my buddy Charlie at Tower Associates, and then myself and Dean Lewis edited it a bit to make it work alongside the scripts we had already produced in our previous posts. I’ve always been an advocate of doing the cutover manually. Cutting over 200 VMs or so in one go is daunting and lacks the control I would personally like. I like to be able to tell customers, ok we have cut over these 20 VMs for this app, please get them to test it, then when they are happy move to the next set. It is nice and controlled and instils confidence in the migration process. That is not to say […]

HCX Mobility Group Migrations using PowerCLI Scripts #HCX @VMwareHCX #PowerCLI #vExpert @saintdle

July 8, 2021 Bilal Ahmed 3

Nothing posted here is supported by VMware 🙂 So when the original scripts were created, HCX Mobility Groups weren’t even a thing! HCX evolves at a rapid rate and I was working with a customer who was using the original scripts but since they were migrating into VMware Cloud on AWS they had access to the Mobility Groups features! The original scripts can be found here. When working on these scripts with my buddy @saintdle we found that the way people had started using them didn’t work as expected for us, we tried William Lam’s script and we received errors: We tried this as well and came across similar issues: Zsoldier’s Tech Blog Also, the customer when trying the scripts […]

HCX PowerCLI and Reverse Migrations #HCX #PowerCLI @saintdle @Virtual_Simon

April 27, 2020 Bilal Ahmed 0

So when you are going to migrating a lot of VMs you really need to script it out, as doing it in the GUI is going to slow you down massively! Now I have posted scripts where going forward to the cloud works well, but I found going in reverse can make the scripts a bit more complex. This is because the source and destination sites change, but you still do everything from the HCX Connector appliance. Special shout out to Dean Lewis @saintdle and Simon Conyard @Virtual_Simon. I have enough PowerCLI skills to be dangerous but I was falling over and needed their assistance to help me figure out what was going on. So this script will let you […]

ESXi PSOD #Homelab #vExpert #ESXi

February 18, 2019 Bilal Ahmed 0

So I booted up my HP Z600, this houses my main management VMs and ESXi runs off a usb stick. So nothing fancy. On boot up I got this lovely screen of joy: I don’t like PSODs they make me sad. Looking at the error and the fact that it was happening at boot up made me think of some USB drive issue. Let’s think about it for a minute, when ESXi is loaded off a USB/SD card it will then run in memory, and if you make a change it will save it to the drive or it will save automatically every hour (KB ). One thing you have to remember is to make sure you configure the advance […]

Some Basic #PowerCLI using foreach to modify #NTP and do #ESXi host backups #vExpert

February 6, 2019 Bilal Ahmed 0

You will have seen my earlier post about learning PowerShell, and now I am using what I think is one of the best things about PowerShell……The foreach loop. I have seen it used many times, and never fully understood it, I kind of got what it did, but now I am getting it into my head and I have been using it to try and various things. So I have been doing more bits in PowerCLI to help improve my scripting skills and just to see if I can make my life easier. Modifying NTP settings on multiple ESXi hosts There is a known bug in PowerCLI 10 where Remove-VMHostNtpServer looks like it has worked, but does not actually do […]

Learn Windows PowerShell in a Month of Lunches, Third Edition #BookReview #Powershell #PowerCLI #Scripting #vExpert

January 15, 2019 Bilal Ahmed 0

So if you follow my posts, one thing you will know about me is that I like learning new things and picking up skills. Through my whole time of working with vSphere, I have used PowerCLI in one way or another. I can muddle my way around a bit, but it has always niggled at me that I don’t know it as well as I could. When people were talking about scripting or sharing their scripts, I could barely follow along, and that to me is very annoying. I always at least want to have a solid base understanding. So I finally got around to buying this book and using it. Whenever you ask around about learning PowerShell, EVERYBODY and I […]

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 […]