For the fifth and final portion of my Git Integration with VS Code blog series, this post focuses on Synchronizing Content with GitHub. Previously in Part 4, we configured Visual Studio Code to establish a connection and download content from GitHub. In this post, I wanted to focus on staging, committing, and pushing content back up to GitHub. Continue reading “Git Integration with VS Code: Part 5 – Syncing with GitHub”
Now that PowerShell has been upgraded, and we installed both Git and VS Code, let’s go ahead and configure our environment for synchronization with GitHub. For me, this part was really the meat and potatoes of getting VS Code to integrate with Git and GitHub.
Installing the PowerShell Module
Now that VS Code is installed, let’s install the PowerShell Module so that it can properly understand PowerShell scripts and *.ps1 files.Continue reading “Git Integration with VS Code: Part 4 – Configuring Visual Studio Code”
In case you missed it, this blog post picks up where Part 1 – Upgrading PowerShell left off. In continuing on with the Git Integration with VS Code blog series, I now present Part 2 – Installing PowerCLI and Git!
NOTE: This process assumes a Windows-based installation, and for the Git install, most of the options were left to defaults unless otherwise noted. Continue reading “Git Integration with VS Code: Part 2 – Installing PowerCLI and Git”
So, I’ve been wanting to do this blog series for quite some time, and I’ve been working to put all of the various bits together. When I first started writing scripts for PowerCLI, I would simply write them using either the native Windows PowerShell ISE or some other text editor like Notepad++. It was fine for a while, but I soon began running into issues with version control. Before I knew it, I quickly ended up with a multitude of files in a folder. Things like script-draft.ps1, script-edited.ps1, script-edit2.ps1, script-working.ps1, script-final.ps1, script-FINAL-20180311.ps1, etc. It quickly got to the point where I didn’t know which files had the latest changes to them, or which ones had the newest feature I implemented (or was trying to implement). Does any of this sound familiar?
At a recent Western PA VMUG meeting, I was introduced to this new product (to me, at least) called Visual Studio Code. Sure, it was another place to work on developing and even running PowerShell and PowerCLI scripts, but I had no idea how about the concept of version control or Git integration that lied within. All of that stuff was completely foreign to me, but sounded interesting. And, with the help of the #vCommunity and some of my own research, I finally got to a point where I understood how I could integrate my VS Code editor with my online GitHub account, and keep them in sync across multiple devices.
Earlier this week, someone on our team received a request to change a VMware virtual machine’s NIC from e1000 to VMXNET3. While the change was a bit manual in nature due to the Guest OS configuration changes, it got us thinking… How many other VM’s might still have e1000 NIC adapters? So, I started working on a script to find out. Continue reading “Finding NICs That Aren’t VMXNET3”
A quick follow-up to my experience presenting at the recent Western PA VMUG.
Hello again, everyone! First of all, I just want to take this opportunity to extend a HUGE “Thank You” to everyone who was able to come out and attend the recent Western PA VMUG! The day was packed full of information, as we got to hear a lot of great presentations about running VMware on AWS, AppDefense, vSphere APIs, and what’s new with PowerCLI. What I like most about these kinds of events is the ability to share, learn, network, meet new users, and catch up with those whom I already know.
As several folks already know, this was my very first time presenting at a VMware User Group meeting. Sure, I was a little nervous at first, but once I got up to present, things just seemed to flow. For me, it was reassuring to know that many in the audience were VMware customers who may have been in my shoes at one time, or perhaps still are. You never know. Although my presentation was mostly focused on some recent PowerCLI scripts I had developed to automate and simplify repetitive tasks, I also talked about my personal journey from avoiding scripting to actually doing it. And in my presentation, rather than just showing lines of code on a screen and explaining what the script does, I highlighted the workflow and thought process behind why I scripted it the way I did. Continue reading “Western PA VMUG Follow-Up”
So, as you can probably tell from my past couple of posts, I’ve been spending a bit of time working with PowerCLI to script and automate several tasks for managing VMware environments. My most recent script combines four tasks I seem to do often when performing cluster-wide maintenance; Enabling and Disabling both SSH and Lockdown Mode. This was actually one of the scripts I discussed at the recent Western PA VMUG meeting held on October 20, 2017.
In this script, like many of my other scripts, it asks the user to enter the vCenter server to connect to, as well as the cluster to work with. Then, the user is presented with five options:
- Enable SSH
- Disable Lockdown Mode
- Disable SSH
- Enable Lockdown Mode
Hello everyone! I want to take this opportunity to let you all know that I’ll actually be presenting at the Western PA VMware User Group meeting on Friday, October 20th! We’re going to meet at Alloy 26 (100 South Commons in Pittsburgh’s North Shore) starting at 11:00 AM. Official registration and full meeting information can be found on the official VMUG page. If you’re a VMware user working or living in the Western Pennsylvania region or surrounding areas, c’mon out and use this opportunity to collaborate and network with other users I’m the VMware community! After all, events like this are put together specifically to get VMware users, administrators, engineers, etc. together to talk about their experience in using VMware products and services.
I will actually be presenting after Kyle Ruddy’s (@kruddy on Twitter) “PowerCLI and vSphere REST APIs: Your Path To Automating All the Things” session. My presentation will cover automation using PowerCLI to manage things like RDM disks, virtual standard switches, NTP settings, and more. You’ll learn how I develop the scripts to simplify repetitive tasks, but also how I use PowerCLI to perform tasks that you may not even be able to do in the GUI! Not only can scripting save time, it can also maintain consistency across within your environment! My goal is to show give you some examples and insight into how you can utilize both PowerShell and PowerCLI to augment the management of your vSphere environment. Continue reading “My Upcoming VMUG Presentation”
I recently built out a new VMware cluster, and in doing so, needed to configure the NTP servers for each host. While this can certainly be done manually, it’s very repetitive and opens up the possibility of missing or misconfigured setting. Fortunately, there’s a way to automate that using PowerCLI!
Now, the way I wrote this script makes it a bit more interactive for the person running it. Typically, you could just define the NTP servers you want to remove, the ones to want to add, and let it run. With this script, it asks the user several questions along the way. Questions like, “What vCenter do you want to connect to?”, “What cluster do you want to scan?”, “Do you want to remove all existing NTP servers? [Y] / [N]”, and so on. There’s also validation included on the responses to the Y/N questions. And at the very end of the script, it checks the NTP services on each host in the cluster. If the NTP service is already running, it will restart the service. If it’s not running, it will start the service. All automatically. Continue reading “PowerCLI: Add/Remove NTP Servers in a VMware Cluster”
Hello again, everyone! Recently, I’ve been working on a script that will create new VM Port Groups on a virtual standard switch (vSS) in a given cluster. While this could probably be alleviated by using a virtual distributed switch (vDS), let’s assume that you have a need to stick with vSS for whatever reason (licensing, company standards, etc.).
In this script, it validates that the VLAN number is in fact a whole number within the range of 1 through 4905. At the end of the script, it asks if you’d like to add another port group to the same cluster or not. I found this to be very handy if you’re standing up a new cluster that only contained vSS, or simply adding more port groups to an existing cluster. Continue reading “PowerCLI: Create New VM Port Groups in a Cluster”