Skip to content

Instantly share code, notes, and snippets.

@kensykora
Last active March 21, 2017 13:42
Show Gist options
  • Save kensykora/889452478e622078910c to your computer and use it in GitHub Desktop.
Save kensykora/889452478e622078910c to your computer and use it in GitHub Desktop.
Getting Started with Vagrant and Windows Boxes
$windowsFeatures = @(
'Web-Server',
'Web-WebServer',
'Web-Mgmt-Console',
'Web-Mgmt-Tools'
);
Install-WindowsFeature -Name $windowsFeatures
#Workaround for IIS Permissions Issues
New-SmbShare -Name vagrant -Path C:\vagrant -FullAccess @("IIS_IUSRS","IUSR", "Administrators")
Remove-Website 'Default Web Site'
New-Website -Name MyWebsite -Port 80 -HostHeader * -PhysicalPath \\localhost\vagrant
<html>
<body>
<p>Hello World</p>
</body>
</html>
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "kensykora/windows_2012_r2_standard"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provision "shell", path: "Configure.ps1"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment