This repository has been archived by the owner on Oct 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,194 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<# | ||
.SYNOPSIS | ||
Disables automatic windows updates | ||
.DESCRIPTION | ||
Disables checking for and applying Windows Updates (does not prevent updates from being applied manually or being pushed down) | ||
Run on the machine that updates need disabling on. | ||
.PARAMETER <paramName> | ||
None | ||
.EXAMPLE | ||
./Disable-WindowsUpdates.ps1 | ||
#> | ||
$RunningAsAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator") | ||
if ($RunningAsAdmin) | ||
{ | ||
|
||
$Updates = (New-Object -ComObject "Microsoft.Update.AutoUpdate").Settings | ||
|
||
if ($Updates.ReadOnly -eq $True) { Write-Error "Cannot update Windows Update settings due to GPO restrictions." } | ||
|
||
else { | ||
$Updates.NotificationLevel = 1 #Disabled | ||
$Updates.Save() | ||
$Updates.Refresh() | ||
Write-Output "Automatic Windows Updates disabled." | ||
} | ||
} | ||
|
||
else | ||
{ Write-Warning "Must be executed in Administrator level shell." | ||
Write-Warning "Script Cancelled!" } |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vm.define "vagrant-windows-7" | ||
config.vm.box = "windows_7" | ||
|
||
# You should be using the vagrant-windows Vagrant Plugin! | ||
# Admin user name and password | ||
config.winrm.username = "vagrant" | ||
config.winrm.password = "vagrant" | ||
|
||
config.vm.guest = :windows | ||
config.windows.halt_timeout = 15 | ||
|
||
# Berkshelf | ||
# config.berkshelf.enabled = true | ||
|
||
# Shell - Hello World | ||
# config.vm.provision :shell, :inline => "C:\\vagrant\\scripts\\HelloWorld.bat" | ||
|
||
config.vm.provider :virtualbox do |v, override| | ||
#v.gui = true | ||
v.customize ["modifyvm", :id, "--memory", 2048] | ||
v.customize ["modifyvm", :id, "--cpus", 2] | ||
end | ||
|
||
config.vm.provider :vmware_fusion do |v, override| | ||
#v.gui = true | ||
v.vmx["memsize"] = "2048" | ||
v.vmx["ethernet0.virtualDev"] = "vmxnet3" | ||
v.vmx["RemoteDisplay.vnc.enabled"] = "false" | ||
v.vmx["RemoteDisplay.vnc.port"] = "5900" | ||
v.vmx["scsi0.virtualDev"] = "lsisas1068" | ||
end | ||
|
||
config.vm.provider :vmware_workstation do |v, override| | ||
#v.gui = true | ||
v.vmx["memsize"] = "2048" | ||
v.vmx["ethernet0.virtualDev"] = "vmxnet3" | ||
v.vmx["RemoteDisplay.vnc.enabled"] = "false" | ||
v.vmx["RemoteDisplay.vnc.port"] = "5900" | ||
v.vmx["scsi0.virtualDev"] = "lsisas1068" | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"builders": [{ | ||
"type": "vmware-iso", | ||
"iso_url": "http://care.dlservice.microsoft.com/dl/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", | ||
"iso_checksum_type": "md5", | ||
"iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", | ||
"headless": true, | ||
"boot_wait": "2m", | ||
"ssh_username": "vagrant", | ||
"ssh_password": "vagrant", | ||
"ssh_wait_timeout": "2h", | ||
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", | ||
"guest_os_type": "windows7srv-64", | ||
"tools_upload_flavor": "windows", | ||
"disk_size": 61440, | ||
"vnc_port_min": 5900, | ||
"vnc_port_max": 5980, | ||
"floppy_files": [ | ||
"./answer_files/2008_r2_core/Autounattend.xml", | ||
"./scripts/win-updates.ps1", | ||
"./scripts/openssh.ps1" | ||
], | ||
"vmx_data": { | ||
"RemoteDisplay.vnc.enabled": "false", | ||
"RemoteDisplay.vnc.port": "5900", | ||
"memsize": "2048", | ||
"numvcpus": "2", | ||
"scsi0.virtualDev": "lsisas1068" | ||
} | ||
}, { | ||
"type": "virtualbox-iso", | ||
"iso_url": "http://care.dlservice.microsoft.com/dl/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", | ||
"iso_checksum_type": "md5", | ||
"iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", | ||
"headless": true, | ||
"boot_wait": "2m", | ||
"ssh_username": "vagrant", | ||
"ssh_password": "vagrant", | ||
"ssh_wait_timeout": "2h", | ||
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", | ||
"guest_os_type": "Windows2008_64", | ||
"disk_size": 61440, | ||
"floppy_files": [ | ||
"./answer_files/2008_r2_core/Autounattend.xml", | ||
"./scripts/win-updates.ps1", | ||
"./scripts/openssh.ps1", | ||
"./scripts/oracle-cert.cer" | ||
], | ||
"vboxmanage": [ | ||
["modifyvm", "{{.Name}}", "--memory", "2048"], | ||
["modifyvm", "{{.Name}}", "--cpus", "2"] | ||
] | ||
}], | ||
"provisioners": [{ | ||
"type": "shell", | ||
"remote_path": "/tmp/script.bat", | ||
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat", | ||
"scripts": [ | ||
"./scripts/vm-guest-tools.bat", | ||
"./scripts/chef.bat", | ||
"./scripts/vagrant-ssh.bat" | ||
] | ||
}, { | ||
"type": "shell", "inline": ["rm -rf /tmp/*"] | ||
}], | ||
"post-processors": [{ | ||
"type": "vagrant", | ||
"keep_input_artifact": false, | ||
"output": "windows_2008_r2_core_{{.Provider}}.box", | ||
"vagrantfile_template": "vagrantfile-windows_2008_r2.template" | ||
}] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"builders": [ | ||
{ | ||
"type": "vmware-iso", | ||
"iso_url": "http://care.dlservice.microsoft.com/dl/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.16384.WINBLUE_RTM.130821-1623_X64FRE_SERVER_EVAL_EN-US-IRM_SSS_X64FREE_EN-US_DV5.ISO", | ||
"iso_checksum_type": "md5", | ||
"iso_checksum": "458ff91f8abc21b75cb544744bf92e6a", | ||
"headless": true, | ||
"boot_wait": "2m", | ||
"ssh_username": "vagrant", | ||
"ssh_password": "vagrant", | ||
"ssh_wait_timeout": "2h", | ||
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", | ||
"guest_os_type": "windows8srv-64", | ||
"tools_upload_flavor": "windows", | ||
"disk_size": 61440, | ||
"vnc_port_min": 5900, | ||
"vnc_port_max": 5980, | ||
"floppy_files": [ | ||
"./answer_files/2012_r2_core/Autounattend.xml", | ||
"./scripts/win-updates.ps1", | ||
"./scripts/openssh.ps1" | ||
], | ||
"vmx_data": { | ||
"RemoteDisplay.vnc.enabled": "false", | ||
"RemoteDisplay.vnc.port": "5900", | ||
"memsize": "2048", | ||
"numvcpus": "2", | ||
"scsi0.virtualDev": "lsisas1068" | ||
} | ||
}, | ||
{ | ||
"type": "virtualbox-iso", | ||
"iso_url": "http://care.dlservice.microsoft.com/dl/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.16384.WINBLUE_RTM.130821-1623_X64FRE_SERVER_EVAL_EN-US-IRM_SSS_X64FREE_EN-US_DV5.ISO", | ||
"iso_checksum_type": "md5", | ||
"iso_checksum": "458ff91f8abc21b75cb544744bf92e6a", | ||
"headless": true, | ||
"boot_wait": "2m", | ||
"ssh_username": "vagrant", | ||
"ssh_password": "vagrant", | ||
"ssh_wait_timeout": "2h", | ||
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", | ||
"guest_os_type": "Windows2012_64", | ||
"disk_size": 61440, | ||
"floppy_files": [ | ||
"./answer_files/2012_r2_core/Autounattend.xml", | ||
"./scripts/win-updates.ps1", | ||
"./scripts/openssh.ps1", | ||
"./scripts/oracle-cert.cer" | ||
], | ||
"vboxmanage": [ | ||
["modifyvm", "{{.Name}}", "--memory", "2048"], | ||
["modifyvm", "{{.Name}}", "--cpus", "2"] | ||
] | ||
} | ||
], | ||
"provisioners": [ | ||
{ | ||
"type": "shell", | ||
"remote_path": "/tmp/script.bat", | ||
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat", | ||
"scripts": [ | ||
"./scripts/vm-guest-tools.bat", | ||
"./scripts/chef.bat", | ||
"./scripts/vagrant-ssh.bat" | ||
] | ||
}, | ||
{ | ||
"type": "shell", "inline": ["rm -rf /tmp/*"] | ||
} | ||
], | ||
"post-processors": [ | ||
{ | ||
"type": "vagrant", | ||
"keep_input_artifact": false, | ||
"output": "windows_2012_r2_core_{{.Provider}}.box", | ||
"vagrantfile_template": "vagrantfile-windows_2012_r2.template" | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"builders": [ | ||
{ | ||
"type": "vmware-iso", | ||
"iso_url": "http://care.dlservice.microsoft.com/dl/download/evalx/win7/x64/EN/7600.16385.090713-1255_x64fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENXEVAL_EN_DVD.iso", | ||
"iso_checksum_type": "md5", | ||
"iso_checksum": "1d0d239a252cb53e466d39e752b17c28", | ||
"headless": true, | ||
"boot_wait": "2m", | ||
"ssh_username": "vagrant", | ||
"ssh_password": "vagrant", | ||
"ssh_wait_timeout": "4h", | ||
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", | ||
"guest_os_type": "windows7-64", | ||
"tools_upload_flavor": "windows", | ||
"disk_size": 61440, | ||
"vnc_port_min": 5900, | ||
"vnc_port_max": 5980, | ||
"floppy_files": [ | ||
"./answer_files/7/Autounattend.xml", | ||
"./scripts/dis-updates.ps1", | ||
"./scripts/win-updates.ps1", | ||
"./scripts/openssh.ps1" | ||
], | ||
"vmx_data": { | ||
"RemoteDisplay.vnc.enabled": "false", | ||
"RemoteDisplay.vnc.port": "5900", | ||
"memsize": "2048", | ||
"numvcpus": "2", | ||
"scsi0.virtualDev": "lsisas1068" | ||
} | ||
}, | ||
{ | ||
"type": "virtualbox-iso", | ||
"iso_url": "http://care.dlservice.microsoft.com/dl/download/evalx/win7/x64/EN/7600.16385.090713-1255_x64fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENXEVAL_EN_DVD.iso", | ||
"iso_checksum_type": "md5", | ||
"iso_checksum": "1d0d239a252cb53e466d39e752b17c28", | ||
"headless": false, | ||
"boot_wait": "2m", | ||
"ssh_username": "vagrant", | ||
"ssh_password": "vagrant", | ||
"ssh_wait_timeout": "4h", | ||
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", | ||
"guest_os_type": "Windows7_64", | ||
"disk_size": 61440, | ||
"floppy_files": [ | ||
"./answer_files/7/Autounattend.xml", | ||
"./scripts/dis-updates.ps1", | ||
"./scripts/win-updates.ps1", | ||
"./scripts/openssh.ps1", | ||
"./scripts/oracle-cert.cer" | ||
], | ||
"vboxmanage": [ | ||
["modifyvm", "{{.Name}}", "--memory", "2048"], | ||
["modifyvm", "{{.Name}}", "--cpus", "2"] | ||
] | ||
} | ||
], | ||
"provisioners": [ | ||
{ | ||
"type": "shell", | ||
"remote_path": "/tmp/script.bat", | ||
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat", | ||
"scripts": [ | ||
"./scripts/vm-guest-tools.bat", | ||
"./scripts/chef.bat", | ||
"./scripts/vagrant-ssh.bat" | ||
] | ||
}, | ||
{ | ||
"type": "shell", "inline": ["rm -rf /tmp/*"] | ||
} | ||
], | ||
"post-processors": [ | ||
{ | ||
"type": "vagrant", | ||
"keep_input_artifact": false, | ||
"output": "windows_7_{{.Provider}}.box", | ||
"vagrantfile_template": "vagrantfile-windows_7.template" | ||
} | ||
] | ||
} |