Puppet IIS Module Troubleshooting

Update on 3/30/17:  The Puppet IIS module has been updated, and the problem below has been eliminated.

Problem scenario:  You want Puppet to install IIS.  You install the IIS module and find the README.md file has this Puppet DSL (as of 12/13/16):

class mywebsite {
  iis::manage_app_pool {‘my_application_pool’:
    enable_32_bit           =true,
    managed_runtime_version =’v4.0′,
  }
   iis::manage_site {‘www.mysite.com’:
    site_path     =’C:\inetpub\wwwroot\mysite’,

How Do You Install IIS In An Automated Way Without The Install-WindowsFeature Command?

Problem scenario:  You want to install IIS on Windows Server 2016 in an automated way.  But you are prevented from using Install-WindowsFeature or Add-WindowsFeature commands for business related reasons.
Normally something like this would work: 
Import-module servermanager; Add-WindowsFeature web-server, web-webserver -Verbose
What do you do?

Solution:  Use PowerShell with the System.Windows.Forms.SendKeys feature.

servermanager
start-sleep 2
[System.Windows.Forms.SendKeys]::SendWait{%”M”}
[System.Windows.Forms.SendKeys]::SendWait{%”M”}
start-sleep 1
[System.Windows.Forms.SendKeys]::SendWait(“{DOWN}”)
[System.Windows.Forms.SendKeys]::SendWait({~})
[System.Windows.Forms.SendKeys]::SendWait({nnn})
start-sleep 1
[System.Windows.Forms.SendKeys]::SendWait({w})
[System.Windows.Forms.SendKeys]::SendWait{~~}
start-sleep 1
[System.Windows.Forms.SendKeys]::SendWait(“%{n}”)
[System.Windows.Forms.SendKeys]::SendWait(“%{n}”)
[System.Windows.Forms.SendKeys]::SendWait(“%{n}”)
[System.Windows.Forms.SendKeys]::SendWait(“%{n}”)
[System.Windows.Forms.SendKeys]::SendWait(“%{i}”)

Understanding CloudBolt’s Errors

Problem Scenario
In CloudBolt (the Cloud Management Platform), you run a job to create a server.  The job stops progressing.  The GUI shows “Failed Order … provisioning nameOfServer” with a bar that has the left most 5% red and the rest of the 95% gray.  What do you do to create the server?

Answer
The server may be created; there may have been a small error when the job ran. 

How Do You Download Big Files with PowerShell?

Problem scenario
You want to download a very large file using PowerShell (from a file share on your network or URL on the Internet).  But the file is larger than the available RAM on your server.  How do you download a large file using Powershell?

Solution
Invoke-restmethod, Invoke-webrequest, curl and wget (even with the redirect “” command) all put the file being downloaded into memory. 

How to Troubleshoot PowerShell Downloading a File From the Internet

Problem scenario:  When trying to use PowerShell to download a file, get you this error ‘Error calling “DownloadFile” with “2” argument(s): “An Exception occurred during a WebClient request.”‘

Solution:  Make sure you have ample space on the disk and make sure the destination folder exists.  A typo in the path or if the folder not existing could cause this error.  Insufficient disk space could also cause the problem. 

How To Port Forward (redirect traffic destined for an IP address to a specific port)

Scenario:  On a Linux server, it can be useful to send traffic destined to a certain IP address to a different port on the server.  The listening service could be unique insofar as its port number has been designated.  The listening service could be a Docker container or a guest virtual machine.
Method:  iptables -t nat -A PREROUTING -i eth3 -p tcp –dport 80 -j DNAT –to 91.91.91.91:81
Explanation: 

How To Enter the Web UI of Gitlab CE without Setting Up Its Backend Email

Problem scenario:  When you bring up the web UI for GitLab CE (Community Edition) for the first time, you are prompted to enter a new password twice.  This password will be for the admin@example.com username.  If someone else set it up and failed to provide you with the username, and the back end email has not been configured, follow these directions.
Prerequisite:  You must have root access.

How To Have The Apache Service Automatically Start When Its Docker Container Is Started

Goal:  To have Apache start when a Docker container starts running do the following (for Docker containers based on RHEL/CentOS/Fedora). 

Prerequisite:  The Docker container was created with the “-p 80:80” flag.  Other port numbers besides 80 will work.  The port numbers do not have to be the same.  They can be any number between 1 and 65535.  If there is no binding of the Docker host’s TCP ports to the container,

How To Potentially Solve an HTTP 403 Error on An Apache Server

Problem scenario:  You are trying to access a file on a website.  But you get the 403 Forbidden error every time.  What are some different things to look for to fix this problem?

Solution:

If you do not have access to the back-end of the web server, try these:

  1. Clear the cache/history from your web browser.
  2. Clear the cookies from your web browser.