Silent IIS UrlRewrite, ARR and FARM provisioning by #PowerShell

Recently, I had the task to run several fitnesse instances in on the single AWS EC2 instance. The requirement was what each fitnesse instance should be accessible trough port 80 (HTTP). IIS as reverse proxy came to the rescue. But there were one more requirement – IIS Reverse Proxy configuration should be automated.

Here >> konstantinvlasenko/IIS Reverse Proxy << you can find a complete PowerShell script how to install IIS and configure it as reverse proxy.

Silent install IIS UrlRewrite and ARR by #PowerShell

Create-Item c:/msi -Type Directory
Invoke-WebRequest 'http://download.microsoft.com/download/C/F/F/CFF3A0B8-99D4-41A2-AE1A-496C08BEB904/WebPlatformInstaller_amd64_en-US.msi' -OutFile c:/msi/WebPlatformInstaller_amd64_en-US.msi
Start-Process 'c:/msi/WebPlatformInstaller_amd64_en-US.msi' '/qn' -PassThru | Wait-Process
cd 'C:/Program Files/Microsoft/Web Platform Installer'; .\WebpiCmd.exe /Install /Products:'UrlRewrite2,ARRv3_0' /AcceptEULA /Log:c:/msi/WebpiCmd.log

Disable the option to check for server certificate revocation on Internet Explorer

We are doing an extensive acceptance testing against SharePoint Online by using PowerSlim (PowerShell).
Unfortunately sometimes our automated tests are blocked by popup below:
CheckCertificatRevocation
As we truly believe that our DNS is not spoiled an we know exactly what we are looking for (pre-created data) – this verification doesn’t make any sense for us.
So we decided to disable it. I was not able to find the solution how to do this trough Windows Registry. Below is how you can do this trough Internet Explorer:

  1. Open Internet Options
  2. Go to Advanced tab
  3. Scroll down to the Security section
  4. Clear check-box below:
    DisableCertificatRevocation
  5. Restart Internet Explorer

#PowerShell: Register AWS EC2 instances in Amazon Route53 (new way)

Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service.
Just in case – Amazon EC2
I use this script https://github.com/konstantinvlasenko/cloud/blob/master/Register-CNAME.ps1 to provide meaningful names for them.
Simple usage:

$config = @{ DomainName = 'mylab.com' }
$name = "www.$($config.DomainName)"
# get instances
$instance = (Get-EC2Instance $InstanceId).RunningInstance
# update R53
.\Register-CNAME.ps1 $config $name $instance.PublicIpAddress

Advanced usage (register in another account; registering A record):

$config = @{ DomainName = 'mylab.com'; AssumeRoles = @{ R53 = @{ ARN = 'arn:aws:iam::600021112340:role/Route53'; SessionName = 'Friends' } }; }
$name = "www.$($config.DomainName)"
# get instances
$instance = (Get-EC2Instance $InstanceId).RunningInstance
# update R53
.\Register-CNAME.ps1 $config $name $instance.PublicIpAddress 'A'