Last active
March 21, 2017 13:42
-
-
Save kensykora/889452478e622078910c to your computer and use it in GitHub Desktop.
Getting Started with Vagrant and Windows Boxes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<p>Hello World</p> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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