Installing NAnt on Windows Server 2012

URL for Download

https://sourceforge.net/projects/nant/files/nant/0.92/nant-0.92-bin.zip/download

Powershell Example

Invoke-WebRequest -Uri  https://downloads.sourceforge.net/project/nant/nant/0.92/nant-0.92-bin.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fnant%2Ffiles%2Fnant%2F0.92%2F&ts=1484610299&use_mirror=cytranet -OutFile C:\nant.0.92.zip

Unzip to C:\Program Files (x86)\

Unblock Files

gci -Recurse 'C:\Program Files (x86)\NAnt\' | Unblock-File

Unzip function

function Expand-ZIPFile($file, $destination)
{
  $shell = new-object -com shell.application
  $zip = $shell.NameSpace($file)
  foreach($item in $zip.items())
  {
    $shell.Namespace($destination).copyhere($item)
  }
}

Unzip Example

Expand-ZIPFile –File "C:\nant.0.92.zip" –Destination "C:\Program Files (x86)\NAnt"