This Command “gem install contint.gem” Hangs Forever

Problem scenario:  You are running gem install *.gem and it hangs.  This stalling appears to be a freeze.  You wait several minutes and nothing happens.  You are waiting for a message or a new prompt.

Solution:  Control-C to get out of it.  Try it again with the “-V” flag like this:

gem install contInt.gem -V

# This time be patient.  Sometimes these commands can take more than 10 minutes to return a message. 

Unexpected PowerShell Closures and Controlling the Flow of PowerShell Scripts

Problem scenario:  You PowerShell or PowerCLI window keeps exiting automatically when you run a script.  You find that RAM and CPU are not constrained.  
Root cause: Human error.
Solution:  Look for the “exit” or the “Exit-Pssession” commands.  These can close PowerShell’s ISE or PowerCLI.  You may need to eliminate these commands or use a different keyword.

———————————————————————————————————————————————————————–
Problem scenario: 

How do you install Jenkins on a RedHat Linux server without an Internet connection?

Problem Scenario 
(If you have an internet connection, see this posting.)  In trying to install the different .rpms (e.g., on CentOS/RHEL/Fedora) for Jenkins you get errors.

For example, here is one command you might try:
yum localinstall springframework-aop-3.2.15-3.fc24.noarch.rpm

This above command may result in an error like this:
“Requires: mvn(org.springframework:spring-beans) = 3.2.15.RELEASE … Requires: mvn(org.springframework:spring-core) = 3.2.15.RELEASE”

Here is another command you might try: 

How Do You Install Pywinrm Without Pip and Without a Yum Repo?

Problem Scenario:  You have CentOS (or a RedHat derivative) and Python is installed.  You want to install pywinrm.  When using Python and Python packages you get this error “gaierror … ‘Temporary failure in name resolution’)).”  How do you install pywinrm without pip and without a relevant yum repo?

Root cause:  It can be caused by excessive open connections.  A reboot could fix the problem.

Perl Script Debugging

Problem scenario:  You are running a Perl program and getting an error “syntax error at cool.pl line x, near …
Global symbol “$foo” requires explicit package name at cool.pl line x…”

Solution:  Find line x – 1, that is, the line before x.  This line may not have a semicolon.  Semicolons are not needed if the Perl script is one line.  Semicolons are not needed for “sub main” declaration lines with a line with just a brace (either “{” or “}”). 

How to Create .EXE Files With PowerShell

Problem Scenario 
You want to package a standalone .ps1 script as an .exe file.  How do you create an executable file that does what a PowerShell script does?

Solution 
Install PowerShell Community Extensions.  Then download this .ps1 file and use it according to the conventions in the comments, near the top, of the script itself,

The usage instructions are in the code. 

How To Install PowerShell Community Extensions

Problem Scenario:  You want the rich features provided by PowerShell Community Extensions (also known as PSCX).

Solution:
1.  Download the .msi from this link
2,  Double click it. 
3.  Install it by accepting the License Agreement and the defaults. 
4.  Open PowerShell as Administrator. 
5. In PowerShell, Change directories to where it was installed (e.g., C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\Pscx). 

How To Integrate Perl, Ruby, and Python Programs

Problem scenario
You want a Perl program to call a Python program to call a Ruby program to call another Python program.  You are using Linux as the OS.

Solution
Here is a one-line Perl program (course.pl) that calls a Python program:

system( “python /home/ec2-user/cont.py”);

Here is a two-line Python program named cont.py.  It invokes a Ruby program.

import subprocess
subprocess.call([‘ruby /home/ec2-user/integration.rb’],

Windows Server 2012 Scheduled Tasks Are Not Launching PowerShell Scripts Properly

Problem scenario:  For no apparent reason, Scheduled Tasks are not kicking off PowerShell scripts.  You have configured Scheduled Tasks to launch .ps1 files.The task calls “%windir%\system32\WindowsPowerShell\v1.0\PowerShell_ISE.exe” (in the Action tab’s “Program/Script” field) with an argument like this C:\Program Files\good script.ps”

You manually run the scheduled task (by right clicking its name and choosing Run) and the Scheduled Task will seem to run.  In reality, the .ps1 file will not execute (despite having the correct Execution Policy). 

PowerShell Can Throw a SetInfo With 0 Argument(s) Error When Creating a User

Problem scenario
You run a PowerShell script that has a command setinfo.  For example, the script is like this:

        #…
        $userName = ‘jdoe’
        $compName = $env:COMPUTERNAME
        $cona = [ADSI]”WinNT://$compName”
        $user = $cona.Create(‘User’,$userName)
        $user.SetInfo()

You get “Exception calling “SetInfo” with “0” argument(s): “The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements.”

You may go to Administrative Tools ->