In languages like C, you have Switch statements allowing you to evaluate the input, then have a few options for the output. Switch statements are used in place of a series of if/else statements in order to make your code more readable. Case statements can also have better performance than a traditional if/else setup. This is because if you have a bunch of if statements, the system will have to evaluate all of the if statements at the time of execution. However, with a case statement, it is Read more […]Read More
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 […]
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.
This article will decribe how you can send emails programatically using hte Java programming language. The example below includes a function you can use for easily sending emails from your Java application.PrerequisitesIf you have not already, be sure you download and install the latest Java Development Kit (JDK). You can find the download here.Unforutnatley the javax.mail libraries are not included in the Java JDK, so you will have to download them separately.The java mail library can be downloaded Read more […]
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.