robot with a square head and yellow eyes

Automatically deploy Puppet agent on VMWare Templates

Ensuring your Puppet Agent is installed on all machines in your environment can be a challenging task.  Today I will share a tip on how you can ensure that the puppet agent us automatically deployed to all of your new virtual machines. Explanation When you deploy a VMWare template, you have the option to create a customization specification.  You can add a command to this customization specification to automatically deploy the puppet agent, after the template has finished deploying. One of Read more […]


backlit keyboard

Manually create TCP Printer Port using Powershell

Adding Network printers to a print server can be cumbersome when doing it through the GUI. For that reason, you may want to attempt to do it via a CLI interface. In this article I describe the Powershell commands for adding a TCP port for a TCP printer. As well as how to bulk create the TCP printer ports using a Powershell For loop.SyntaxThe syntax for adding the TCP print port via powershell is as follows:Add-PrinterPort -Name “ip_IPAddress” -PrinterHostAddress IPAddressExamplesHere is an example Read more […]


spider web

Fixing Error 500 in WordPress

WordPress can break for a variety of reasons.  Generally when it breaks, you will have one of a few symptoms.  You will get an HTTP error, you will get a blank page, or there will be some broken functionality.  The goal of this article is to troubleshoot the HTTP Error 500 you may see. HTTP Error 500 means internal server error. This can have a variety of causes. With wordpress there are 4 common causes: Allocated Memory has been exhausted Corrupted .htaccess file corrupted php file Read more […]


code screenshot

Squashing GIT Commits

When you are working with version control. You may have multiple commits that you would like to combine into a single commit. Or perhaps you want to change their order, etc… First you need to determine how far back you want to go. Open a command prompt or terminal window, navigate to your Git Repository. next, type> git log -10 The above command will show the last 10 commits. If that does not go far enough back, in increase the number 10 Once you have identified the commits you wish to Read more […]


laptop on desk

Enable BranchCache On Netapp CIFS shares

Branch Cache is a caching technology to help with performance when accessing file shares over a WAN. Netapp supports this technology and it can be used with compatible clients such as Windows 7 Enterprise and newer, and Server 2008r2 and newer Enable Branch Cache on a storage system Enable SMB 2.1:

The command enables both SMB 2.0 and SMB 2.1. Enable BranchCache:

Optional: Configure the time (in seconds) to keep Read more […]


windows

Windows Update Commands – USOClient, Powershell, WUAUCLT

The windows Update CLI commands are useful for troubleshooting Windows Update errors. And they are helpful when you need to automate the windows update tasks. In newer versions of windows, the WUAUCLT command has been deprecated and replaced with the usoclient. In this article we have included the options and syntax for using wuault, usoclient, and powershell to detect and install windows updates WUAUCLT The windows update command utility in windows is: WUAUCLT. This stands for Windows Update Read more […]


purple code

Reading and Writing Files in Java

A common task in any programming language is Reading and Writing files. Below are a couple of functions that can be used for these purposes, along with descriptions of their use. Be sure to import java.io for these functions to work.


code in dark text editor

Sending an email Programmatically using Java

This article will describe how you can send emails pragmatically using the Java programming language. The example below includes a function you can use for easily sending emails from your Java application. Prerequisites If you have not already, be sure you download and install the latest Java Development Kit (JDK). You can find the download here. unfortunately the javax.mail libraries are not included in the Java JDK, so you will have to download them separately. The java mail library can Read more […]


laptop in front of brick wall

Virtual machine(s) invalid in vCenter

Sometimes virtual machines within your VMWare environment may show up as invalid. The machine is in-fact still running at this point; but you are unable to manage the virtual machine. This can happen for a few reasons, but in my experience the most common is when the esx host is unable to access the storage.

I have seen this caused by high latency when accessing an NFS datastore, when you leave an offline datastore mounted for an extended period, and I have also seen this happen when a SAN controller failover event occurs.

This condition happens when the esx host cannot access the vmx file (vmware configuration file) in the datastore, so VMWare just sort of forgets the configuration of the machine. The process which runs the virtual machine is still running on the host, so your VM does not crash. But, you still need to recover since HA, DRS, etc… no longer work when the VM is in this state.


glasses in front of computer screen

Scripting Basics

Scripting is a very useful skill which will save any Sysadmin a lot of time. Who wants to go to every device in their environment and perform the same task over and over again? In this posting I will cover a few basics for those getting started in scripting.