How Do You Create a New User on a Windows 2016 Server with PowerShell?

Problem scenario
You want to use PowerShell to create a local user on the server.  What command do you run to do this?

Solution
1.  Open PowerShell as Administrator.  
2.  Run this (but replace "jane" with the username you want):   New-localuser -Name jane
# respond to the pop-up GUI with a password that is reasonably strong.

How Does the Dictionary Definition of Automation Relate to Software GUI Automation?

Question
How does the dictionary definition of automation relate to software GUI automation?

Answer
The most common definition (and first-listed) of the word automation on Dictionary.com's website is "the technique, method, or system of operating or controlling a process by highly automatic means, as by electronic devices, reducing human intervention to a minimum."  Attended and unattended robotic process automation solutions can greatly enhance productivity and reduce the likelihood of errors.  To learn more about RPA see this posting that defines it or this posting that gives insight into when it should be used.

How Do You Select More RAM to Purchase for Your Desktop and Know the Difference between DDR3 and DDR4 RAM?

Problem scenario
You want to buy more RAM for your desktop computer.  You find it is frequently memory constrained (e.g., when you look at the Task Manager if it is running Windows or use the top utility from a Linux command prompt.  What should you do?

Solution
Know the difference between DDR3 and DDR4 RAM.  If you want to read an article about the difference between DDR3 and DDR4 RAM, see this link. 

DDR4 RAM costs more.  Here is a link to DDR4 RAM if you want to buy some.  For buying more affordable DDR3 RAM, see this link.

Beware, many motherboards support either DDR3 or DDR4.  Only a few can support either.  Even then the slots themselves are dedicated to either DDR3 or DDR4; one slot can support only one type (DDR3 or DDR4) however.

Aside from the type DDR3 and DDR4, attributes of RAM that should affect the purchasing consideration include the bus speed (measured in Mhz) and the size of the RAM (measured in GB).  You want your memory to perform well for the price that you pay.

A List of VMware vSphere Books

Automating vSphere with VMware vCenter Orchestrator (VMware Press Technology) by Cody Bunch
Building Blocks: vSphere 6.0 and vCenter 6.0 by Tom Burge  and Calvin Kohler-Katz
Cloud Computing, A Practical Approach by Toby Velte,  Anthony Velte  and Robert Elsenpeter
Critical VMware Mistakes You Should Avoid by Larry Loucks  and Rajen Guendoo
Disaster Recovery using VMware vSphere Replication and vCenter Site Recovery Manager - Second Edition by Abhilash G B
Enterprise Java Applications Architecture on VMware by Emad Benjamin
IBM System Storage N Series With Vmware Vsphere 5 by IBM Redbooks
It Architect: Foundation in the Art of Infrastructure Design: A Practical Guide for It Architects by Vcdx-001, John Yani Arrasjid
Learning PowerCLI by Robert van den Nieuwendijk
Learning PowerCLI - Second Edition by Robert van den Nieuwendijk        
Learning Veeam® Backup and Replication for VMware vSphere by Christian Mohn
Learning VMware vSphere by Abhilash G B  and Rebecca Fitzhugh
Managing and Optimizing VMware vSphere Deployments (IT Best Practices) by Sean Crookston  and  Harley Stagner
Mastering PowerCLI by Sajal Debnath
Mastering VMware vSphere 5 by Scott Lowe
Mastering VMware vSphere 5.5 by Scott Lowe , Nick Marshall, Forbes Guthrie, Matt Liebowitz  and Josh Atwell
Mastering VMware vSphere 6 by Nick Marshall, Scott Lowe , Grant Orchard  and Josh Atwell
Mastering VMware vSphere Storage by Victor Wu and Eagle Huang
Maximum vSphere: Tips, How-Tos, and Best Practices for Working with VMware vSphere 4 by Eric Siebert  and Simon Seagrave
Networking for VMware Administrators (VMware Press Technology)  by Christopher Wahl  and Steve Pantol
PowerCLI Cookbook by Philip Sellers
PowerCLI Essentials by Chris Halverson
Storage Design and Implementation in vSphere 6: A Technology Deep Dive (2nd Edition) (VMware Press Technology)  by Mostafa Khalil
Storage Implementation in vSphere 5.0 (VMware Press) by Mostafa Khalil
Study Blast VMware Certified Professional - Datacenter Virtualization VCP5-DV Study Guide: VM Ware VCP-510 (VCP5-DV - VCP5-DCV) by Matt Satori
Troubleshooting vSphere Storage  by Mike Preston
VCA-DCV VMware Certified Associate on vSphere Study Guide: VCAD-510  by Robert Schmidt  and Dane Charlton
VCA/VCP6-DCV on VMware vSphere 6 All-In-One Exam Guide (Exams 1V0-601 & 2V0-621) by Tim Garlick
VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: Exam VCP-550 by Brian Atkinson
VCP5 VMware Certified Professional on vSphere 5 Study Guide: Exam VCP-510 by Brian Atkinson
VCP6-DCV Official Cert Guide (Exam #2V0-621) (3rd Edition) (VMware Press Certification) by John A. Davis, Steve Baca and Owen Thomas
VCP6-NV Official Cert Guide (Exam #2V0-641) (VMware Press Certification) by Elver Sena Sosa
VCP6-DCV: VMware Certified Professional-Data Center Virtualization on vSphere 6 Study Guide: 2V0-621 by Wiley
VCP VMware Certified Professional on vSphere 4 Study Guide: Exam VCP-410 by Brian Perry, Chris Huss  and Jeantet Fields
Virtualization Changes Everything: Storage Strategies for VMware vSphere & Cloud Computing  by Vaughn Stewart  and Michael Slisinger
Virtualization Essentials by Matthew Portnoy
Virtualization Security: Protecting Virtualized Environments by Dave Shackleford
Virtualizing and Tuning Large Scale Java Platforms (VMware Press Technology) by Emad Benjamin
Virtualizing Microsoft Business Critical Applications on VMware vSphere (VMware Press Technology) by Matt Liebowitz  and Alexander Fontana
Virtualizing Oracle Databases on vSphere (VMware Press Technology) by Kannan Mani and Don Sullivan
Virtualizing SQL Server with VMware: Doing IT Right (VMware Press Technology) by Michael Corey, Jeff Szastak  and  Michael Webster
VMware Cookbook: A Real-World Guide to Effective VMware Use  by Ryan Troy and Matthew Helmke
VMware NSX for vSphere Essentials: A practical guide to implementing Network Virtualization (VMware Press Technology) by Anthony Burke, Andreas la Quiante and Neil Moore
VMware Software-Defined Storage: A Design Guide to the Policy-Driven, Software-Defined Storage Era  by Martin Hosken
VMware vSphere 4 Implementation by Mike Laverick
VMware vSphere 5 Clustering Technical Deepdive by Duncan Epping  and Frank Denneman
VMware vSphere 5.1 Clustering Deepdive (Volume 1) by Duncan Epping  and Frank Denneman
VMware vSphere 5.1 Cookbook by Abhilash GB
VMware vSphere 5.5 Cookbook by Abhilash G B
VMware vSphere 5.5 Essentials by Kunal Kumar  and Christian Stankowic
VMware vSphere 5.x Datacenter Design Cookbook by Hersey Cartwright
VMware vSphere 5® Building a Virtual Datacenter (VMware Press Technology) by Eric Maille and René-Francois Mennecier
VMware vSphere 6.X Datacenter Design Cookbook - Second Edition by Hersey Cartwright
VMware vSphere and Virtual Infrastructure Security: Securing the Virtual Environment by Edward Haletky
VMware vSphere Datastore Clustering - Quick Guide by Ronan Smyth
VMware vSphere Design by Forbes Guthrie, Scott Lowe  and Kendrick Coleman
VMware vSphere Design Essentials by Puthiyavan Udayakumar
VMware vSphere ESXi Installation Guide by Ronan Smyth
VMware vSphere For Dummies by Daniel Mitchell  and Tom Keegan
VMware vSphere Performance: Designing CPU, Memory, Storage, and Networking for Performance-Intensive Workloads by Matt Liebowitz, Christopher Kusek  and Rynardt Spies
VMware vSphere PowerCLI Reference: Automating vSphere Administration by Luc Dekens , Alan Renouf, Glenn Sizemore, Arnim van Lieshout  and  Jonathan Medd
VMware vSphere PowerCLI Reference: Automating vSphere Administration by Luc Dekens, Jonathan Medd, Glenn Sizemore, Brian Graf, Andrew Sullivan and Matt Boren
VMware vSphere Resource Management Essentials by Jonathan Frappier
VMware vSphere Security Hardening Guide by Ronan Smyth
VMware vSphere Troubleshooting by Muhammad Zeeshan Munir
vSphere 6 Foundations Exam Official Cert Guide (Exam #2V0-620): VMware Certified Professional 6 (VMware Press) by Bill Ferguson
VMware VI and vSphere SDK: Managing the VMware Infrastructure and vSphere by Steve Jin
vSphere Design Best Practices by Brian Bolander  and Christopher Kusek
vSphere 4.0 Quick Start Guide: Shortcuts down the path of Virtualization by Duncan Epping, Alan Renouf, Bernie Baker, Thomas Bryant  and Stuart Radnidge
vSphere Design Pocketbook 2.0: Blog Sized Design Considerations for Your Software Designed Data Center by Frank Denneman
vSphere High Performance Cookbook by Prasenjit Sarkar
vSphere High Performance Cookbook - Second Edition by Christopher Kusek Bio and Kevin Elder
vSphere High Performance Essentials by Christian Stankowic
vSphere Security Cookbook by Mike Greer
vSphere Virtual Machine Management by Rebecca Fitzhugh

How Can Variables Be Carried across Multiple PHP Pages (Not Just Immediate Subsequent Pages)?

Problem scenario
You want to pass variables from user input and have them carry across multiple pages.  You may or may not want the immediate subsequent page to use the variables.  You want pages (.php files) after several clicks of navigation (two pages or more) to employ the variables that were read in or calculated via PHP pages.

You are using session_set() and/or session_start() but they are not working.  Your $_SESSION['variablename'] usage is not working as you expect.  What do you do to have global variables so you can take in user input from one page and have pages two pages away use those variables?

Solution
Use session_start() above any HTML code on the page after the "Submit" button was clicked.  That is, on a page that has the $_POST['varname'] available, use the session_start() PHP function before any HTML code.  Do not use session_set() for a modern version of PHP.  Here are three pages below that can work as an illustration.  To use them, you'll put them all in the same directory.  The first one will read in user input.  The second page acts as an intermediate page.  The third page (arrived to by clicking a button on the second page), has access to the global variables which are the user input.

1.  one.php should have the following content:

<html>
<body>
<h2> Welcome to page 1.  Enter your credentials here.</h2>
<form action="two.php" method="post">
UserName: <input type="text" name="username"><br>
Password: <input type="password" name="password"><br>
<input type="submit">
</form>

</body>
</html>

2.  two.php should have the following content:

<?php
   session_start();
   $_SESSION['username'] = $_POST['username'];
   $_SESSION['password'] = $_POST['password'];
?>
<html>
<body>
<h2> Welcome to page 2.  Click submit to proceed to the third page.  </h2>
<form action="three.php" method="post">
<input type="submit">
</form>

</body>
</html>

3.  three.php should have the following content:

<?php
   session_start();
   echo "The username you entered on the first page was ";
   echo $_SESSION['username'];
   echo ".";
   echo "\n";
   echo "This proves the variable is global.";
   $var1 = $_SESSION['username'];  //This is a suggestion for PHP coding.
?>

4.  Go to http://x.x.x.x/one.php and enter any username and password you like.  Make sure the username is not blank.  Click "Submit query."  Click "Submit query" again.

How Do You Quickly Install Several Python Packages Such as Pycrypto and Paramiko on RedHat Linux?

Problem scenario
How do you install pycrypto, paramiko and the several related packages without copying several individual packages on a RedHat Linux server?

Background
It can be tedious getting the different dependencies of python packages installed.  By downloading various .tar.gz files, you have to unpack them, then run a series of "python setup.py ..." commands. While it is not advisable to install more packages than are strictly necessary, there are some benefits to doing it (e.g., having these features available to you).

Solution
Install pip, Ansible and other packages.  Run these commands as root:

yum -y update
yum -y install java gcc python-openssl openssl-devel openssl
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
pip install ansible

How Do You Install Java on an AWS Instance of RHEL?

Problem scenario
You are using RedHat Enterprise Linux 7.x in AWS.  How do you install Java?

Possible Solution #1
Use this posting as it is preferred. Below is an alternative.

Possible Solution #2
This will install Java 1.8.x.

1. Create a file named java.sh with this as the content:

yum -y install java-1.8.0-openjdk*
JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk
echo 'export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk' >> ~/.bashrc
source ~/.bashrc
sudo -s
sudo -s source /etc/environment

2.  Run this command: sudo -s source java.sh

3.  You are done.  To test, you can run java -version and echo $JAVA_HOME. If you are having network issues, you may want to view this posting.

A List of RabbitMQ Books

Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions by Gregor Hohpe and Bobby Woolf
Instant RabbitMQ Messaging Application Development How-to by Andrew Keig
Learning RabbitMQ by Martin Toshev
Mastering RabbitMQ by Emrah Ayanoglu, Yusuf Aytas and Dotan Nahum
Production-Ready Microservices: Building Standardized Systems Across an Engineering Organization by Susan J. Fowler
RabbitMQ Cookbook by Sigismondo Boschi and Gabriele Santomaggio
RabbitMQ Essentials by David Dossot
RabbitMQ in Action: Distributed Messaging for Everyone by Alvaro Videla  and Jason J. W. Williams
RabbitMQ: Questions and Answers by George Duckett
Storm Applied: Strategies for real-time event processing by Sean T. Allen, Matthew Jankowski  and Peter Pathirana
Streaming Data: Understanding the real-time pipeline by Andrew Psaltis

How Do You Run (Execute) a Java Program That Compiled Successfully?

Problem scenario
You try to run a compiled Java program.  You see the .class file as a result of your compilation.  But when you run java ContInt.class, you get this error:

"Error: Could not find or load main class ContInt.class"

How do you run the bytecode (to have your Java program execute after compilation)?

Solution
Omit the ".class" when you run the "java" command.  In other words, run this command:  java ContInt

How Do You Install Ansible on an AWS Instance of RedHat Enterprise Linux?

Problem scenario
One of the following applies:
1. You want to install Ansible on an AWS instance of RHEL.  
2. You want to install Ansible on a GCP server running RHEL.

How do you do either of these things?

Solution
These directions should work for other RedHat distributions of Linux (e.g., Fedora or CentOS) that are not AWS servers as long as the server has 2 GB of RAM.

Prerequisite:  Create an RHEL 7.x instance with 2 GB of RAM.  If you cannot afford this much memory, you could use virtual memory (aka swap space) by following the directions on this link.

Run these commands:  

sudo yum -y update
sudo yum -y install gcc python-devel openssl-devel  
sudo curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
sudo python get-pip.py
sudo pip install ansible

# Test your installation with this command:  ansible --version
# If the above does not work, you may have packages configured in a special way. You may want to try this command: sudo yum -y install ansible