The v.G.O.A.T.

Recently there has been an uptick in conversations surrounding the G.O.A.T. With the live sports world essentially halted, ESPN and the rest of the sports channels are replaying old games and focusing on some of the greatest and most popular players of each sport. Yes, I still have normal cable. Being a pretty big sports fan it’s been a pretty good filler in the absence of live sports. I’ve enjoyed watching ‘The Last Dance’ which focused on Micheal Jordan, ‘Tiger Slam’ focused on Tiger Woods and some others like Gretzky, Mike Tyson Cal Ripken. As a nostalgic sports fan it has been great. 

So this is a tech blog right? So all of these shows had me thinking about who in the VMware community is the G.O.A.T., or the IronMan, a person that you would want to aspire to be like. Knowing that you may never reach that greatness! But who makes me want to hit the keyboard, and create something cool, or automate that strange thing to save me a few mouse clicks, etc.

While I think that the VMware community is full of great folks, it is a very large community with a lot of positive attitudes that are willing to help. I can say that honestly as I have been around for quite a while and participate(d) in several other communities that aren’t as well established. 

The person that jumps out at me is William Lam. He is head and shoulders above anyone else in the community. He is the vGoat.

So what makes William the v.G.O.A.T.-? Several things.

  • Longevity
  • Quality Content
  • Nobel Intent
  • Generally speaking, a really nice person

Longevity

His blog https://www.virtuallyghetto.com/ has been around for over 10 years. Honestly, I would love to see the stats his blog generates. I’m happy when I see 10-15 views per day on my blog, lol. He’s a machine.

Quality Content

He is an expert. He is intelligent. His blog posts reflect this. The content of his posts are detailed and consumable. Whether it be a new feature, troubleshooting a common problem, or just something cool that he has been working on, his writing style allows you to be immersed in the content to understand the purpose of the blog post. The level of automation that he is able to achieve across a wide variety of technology is pretty amazing when you step back and take a look. His knowledge spans many products, not a stove pipe. His knowledge is deep, not just wide. The frequency of the content is also something to note. This is where I’d love to see his stats again, but I would venture to say 1-2 blog posts a week is normal if not a bit low.

Nobel Intent

While I cannot speak for William, I truly believe his goal is to educate everyone. He wants to share the solutions he works on, and make life easier for anyone that uses the products he touches. He cares, about his work, helping others, delivering great products, great content, etc. The word ‘Passion’ comes to mind when I think of him. He is so energetic about his work, it addictive, it excites me to jump back into something I am working on.

Generally speaking, a really nice person

I have had the pleasure of talking with William over the years and its a pleasure. He is a kind person. Loves to talk tech stuff, he is interested in learning about those edge cases and weird scenarios you may have. 

The tech oozes from his soul. That is something I appreciate. 

So Check out his blog and follow him on Twitter, or vGhetto. You will never be bored.

The Great ones always stand out. Thank you for all that you do William.

Reset-Module ~ Something that’s been missing for a while.

I write a lot of little PowerShell Modules that I am constantly tinkering with. This forces me to reload those modules in my console windows constantly. For each module it’s three commands:


Remove-Module -Name RestPS

Update-Module -Name RestPS

Import-Module -Name RestPS

It’s Annoying!

So here is a simple function to take care of those commands with a single command!


Reset-Module -Name RestPS

The Function is available in the ‘jpsider’ module on the PowerShell Gallery.

If you have any issues, report them on GitHub.

Enjoy!

Folding@home – How you can help.

One thing I have learned over the past few years is that I really enjoy helping people out. With the current world events and everything I normally do in my day to day life (coaching soccer, volunteering at the children’s school, etc) canceled for the foreseeable future, it was nice to see that I have another way. Enter – Folding@home.

My wife was ecstatic when I told her that I was going to run upstairs and start folding. She was less enthused when she found out it was not going to be clothing.

Twitter has been blowing up the past few days about Folding@home, so I did some research and determined I can help! At a minimum, I knew I could use my VMware based homelab to throw cycles at the cause. I also reached out to the owner of my company, Belay Technologies, to see if we could use idle equipment in our lab. Sure enough, the answer was yes!

One thing I love about Belay Technologies is that we are always looking for ways to help.

Okay, Okay…  You may be wondering what Folding@home is. The answer is that it’s a distributed computing solution that is looking to solve scientific problems. It’s nerd stuff!

folding

Need more information on Folding@home, Check out their website. Review their FAQ.

What’s been the buzz on Twitter? Well, VMware decided to create a fling to make an appliance that is easy to deploy into vSphere and run Folding@home. Since it was VMware, I had to try it right?

Check out their blog post from the Office of the CTO.

It didn’t take long to get started.

  1. Visit the Fling Site and download the OVA.
  2. Review the PowerCLI script (cringe a little, it needs some TLC).
  3. Modify the PowerCLI script to work in my environment. 🙂
  4. Deploy the OVA to my homelab.
  5. Create a team for Belay Technologies.
  6. Deploy the OVA to the Belay Lab.

And now we are helping to save the world, without leaving the office.

folding01

Here is a quick snippet on how it works from the Folding@home website.

foldingworks

  • Team Numbers (To view stats)
    • VMware – 52737
    • BelayTech – 246789

Hopefully, you will take some time to consider helping the cause by donating your unused CPU cycles.

READ THIS!

Before loading software on your personal computer, please consider the security implications. I do not recommend running this software on a computer that stores your personal information. Additionally do not run this on your work computer without your employer’s written consent. The program is designed to consume nearly 100 percent of your available CPU cycles.

Thank you to all of the folks over at VMware that have made the deployment of the Appliance to easy. It was a great idea and even better execution!

Side note; In my homelab, I needed to have the vCenter running in order to deploy the appliance. Once it was deployed I powered the vCenter off to give the full CPU availability to the appliance (my environment is running on an Intel NUC).

Happy Folding!

vSphere 7 – vCenter Server Profiles Preview

As a decision-maker for several large projects, I constantly need to make difficult decisions regarding the purchase of software licensing. One of the things I look for is ‘what are those software vendors doing to reduce my operating costs’? Do they include tools to manage their products? Are they looking to their users to define their roadmap? VMware consistently delivers features and capabilities that make my life easier, Period.

Let me set the stage. For one of my primary projects, I support 60+ vCenter servers across multiple sites. To date, I have not found a single tool that can provide configuration and lifecycle management for our vCenter servers. To be perfectly honest the idea of backups and disaster recovery was really just an afterthought. In our shop, we found it just as easy to deploy a new vCenter than it was to fix an old or broken one.

I assume that while my environment might be on the extreme side of the envelope when it comes to the number of vCenters, the VMware community has desired a vCenter configuration management tool for some time.

Enter vSphere 7 and vCenter Server Profiles. Words cannot express my level of excitement for a vendor-supported solution! This new feature promises to deliver an interface that will allow vSphere administrators to easily and uniformly manage multiple vCenter servers.

vsp7_00

NOTE: THIS IS NOT HOST PROFILES!

Keep in mind that for the initial release there is no User Interface. All interaction is through REST APIs. Get out your console’s folks!

The API currently has four actions:

  • List – Provide a list of configurable items (by section)
  • Export – Exports the configuration profile via a JSON file.
  • Validate – Validates the configuration against a supplied JSON file.
  • Import – Imports a profile to vCenter Server via a JSON file.

The APIs will also be available in the API Explorer that is located in the Developer Center.

vsp7_02

The process seems pretty simple.

  1. Configure the ‘Gold’ or template vCenter
  2. Export the configuration
  3. Then Import the configuration to any vCenter that you want to be configured the same way!

vsp7_03

Configuration validation is one of the new features I look to take advantage of. I plan on writing a simple PowerShell process to run on a schedule that simply takes the exported ‘Gold’ copy of the configuration and validates it against all of my vCenters.

vsp7_01

I love this new addition to vSphere 7 and cannot wait to get my hands on it. Kudos to the VMware team for listening to its customers and community of users!

‘Open-ConsoleWindow -Count 3’ … It’s that easy

I’ve added a new function to the ‘jpsider’ module. I always find myself opening multiple console windows using the mouse. Yeah, I said it, I use the mouse! Well, it is too many clicks, so now I have a function that can open the new consoles for me! This will work for ‘PowerShell.exe’ and ‘Pwsh.exe’. I will need to do some testing on linux and Mac, as the current function will not work. If anyone has a desire for that please open an issue on GitHub for me.

Here is how you use it:

 
Install-Module -Name "jpsider" 
Open-ConsoleWindow -Count 3 -Executable "PowerShell.exe"

Or:

  
Open-ConsoleWindow -Count 3 -Executable "pwsh.exe"

Here is what it looks like – Notice I make use of the ‘Update-ConsoleTitle’ Function too!

NewConsole

#SayNoToMouse

Update-ConsoleTitle -Title “Why did I wait so long?”

Not sure about you, but I am constantly trying to keep track of multiple PowerShell console windows that I have open. I tend to try and update the title of the console by using the following line:

$Host.UI.RawUI.WindowTitle = "Some Fancy Title"

However, trying to remember that is a pain in the butt. So I have created a function and added it to a new Module on the PowerShell Gallery. Why did I wait so long to make a function for this?!?!


Install-Module -Name "jpsider"

Update-ConsoleTitle -Title "Some Fancy Title"

This function name is so much easier to remember. Hopefully, you will find it useful.

FancyTitle

I plan on adding more helpful functions to this module over time.

PowerShell Scaffolding – How I build modules.

Recently I’ve been getting quite a few inquiries about setting up modules for PowerShell. So, I’ve decided to write about it. Below you will read about how I go about creating a new PowerShell module.

Included in this Post:

  • Overview of Scaffolding
    • Plaster
  • My Module Template
    • Local testing files
  • AsBuiltReport
    • Run through an example

What is Scaffolding?

In it’s simplist form, its a common directory and file structure to help you build a PowerShell module. The directory structure helps separate build tools from the actual module/function files. There are two fairly popular scaffolding tools for PowerShell:

Plaster is the tool that I use to create new module scaffolding. I have found it easy to use and when I was first writing modules, there were quite a few blogs that did really well at helping me understand the process and tools. This was probably the most helpful link that I could find using Plaster. -> Kevin Marquette

My Module Template

Of course nothing in the PowerShell world is complete unless you have put your own twist or spin on it! Over time I have created my own Plaster template that I use to generate my own Modules. While the changes are small, it helps me rapidly generate all of the directories I desire to have in a module. My Module template can be found on GitHub.

My additions to the standard Plaster template are the following:

  • BuildSettings.ps1
    • Separate file to add any additional build settings. It keeps things clean IMO.
  • tests\RunPester.ps1
    • Allows developer to run Pester Tests on the full module on local box.
  • tests\RunPSScriptAnalyzer.ps1
  • tests\RunPSCodeHealth.ps1
    • Allows developer to run PSCodeHealth on the full module on local box.
  • Example Function and Unit test files
    • Disable-SSLValidation.ps1
      • Example Function (Located in Public and Private folders)
    • Disable-SSLValidation.Tests.ps1
      • Example Unit test file (Located in Public and Private folders)

AsBuiltReport

I’ve been talking with the guys who are working on the core functionality of the AsBuiltReport PowerShell Modules. They’ve asked me to scaffold out two of their repositories to help create an automated build pipeline for their modules. So lets walk through the process to show you how simple it can be.

  1. Install the Plaster Module
  2. Download my Plaster FullModule Template
  3. Run Plaster!

Step 1 – Is fairly easy, open a PowerShell console and run:


Install-Module Plaster<br data-mce-bogus="1">

 

 

Step 2 – Visit the link above and either Fork or clone the repository to your local machine.

Step 3 – Run Plaster, update the paths to match your local directories:


Invoke-Plaster -TemplatePath C:\OPEN_PROJECTS\Invoke-Automation\Powershell\Plaster\FullModuleTemplate\ -DestinationPath .\AsBuiltReport\

 

Then follow the prompts to create your new Module… It’s that simple!


==================================================
Name of your module (AsBuiltReport): AsBuiltReport.Cohesity.DataPlatform
Brief description on this module: AsBuiltReport.Cohesity.DataPlatform
Github repo name for this module (AsBuiltReport.Cohesity.DataPlatform):
GitHub username (AsBuiltReport):
Module author's' name (AsBuiltReport):
Initial module version (0.0.1):
Destination path: C:\temp\PLASTERSHIT\AsBuiltReport\
Creating folder structure
Create docs\images\
Create tests\
Create spec\
Create .vscode\
Create AsBuiltReport.Cohesity.DataPlatform\public\
Create AsBuiltReport.Cohesity.DataPlatform\private\
Create AsBuiltReport.Cohesity.DataPlatform\classes\
Create AsBuiltReport.Cohesity.DataPlatform\data\
Create tests\public\
Create tests\private\
Deploying files
Create appveyor.yml
Create build.ps1
Create BuildSettings.ps1
Create deploy.PSDeploy.ps1
Create .gitignore
Create .vscode\settings.json
Create spec\module.Steps.ps1
Create mkdocs.yml
Create PITCHME.md
Create readme.md
Create LICENSE
Create module.build.ps1
Create AsBuiltReport.Cohesity.DataPlatform\public\Disable-SSLValidation.ps1
Create AsBuiltReport.Cohesity.DataPlatform\private\Disable-SSLValidation.ps1
Create docs\about.md
Create docs\acknowledgements.md
Create docs\index.md
Create docs\Quick-Start-Installation-and-Example.md
Create tests\Project.Tests.ps1
Create tests\Help.Tests.ps1
Create tests\Feature.Tests.ps1
Create tests\Regression.Tests.ps1
Create tests\Unit.Tests.ps1
Create tests\RunPSCodeHealth.ps1
Create tests\RunPSScriptAnalyzer.ps1
Create tests\RunPester.ps1
Create tests\public\Disable-SSLValidation.Tests.ps1
Create tests\private\Disable-SSLValidation.Tests.ps1
Create spec\module.feature
Create AsBuiltReport.Cohesity.DataPlatform\AsBuiltReport.Cohesity.DataPlatform.psm1
Create AsBuiltReport.Cohesity.DataPlatform\AsBuiltReport.Cohesity.DataPlatform.psd1

This will create the entire directory structure as well as replace the new module name in all of the correct places withing each of the new/copied files. See the Repository used in this example on the AsBuiltReport GitHub.

Feel free to fork/update my Plaster template, I’m always interested to see what the community can come up with.