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
# vim: ft=sh:ts=4:sw=4:autoindent:expandtab: | |
# Author: Avishai Ish-Shalom <[email protected]> | |
# We need to specify GNU sed for OS X, BSDs, etc. | |
if [[ "$(uname -s)" == "Darwin" ]]; then | |
SED=gsed | |
else | |
SED=sed | |
fi |
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
powershell_script "Install IIS" do | |
code "add-windowsfeature Web-Server" | |
action :run | |
end | |
service "w3svc" do | |
action [:enable, :start ] | |
end | |
# cookbook_file "c:\\inetpub\\wwwroot\\Default.htm" do |
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
{ | |
"id": "bobo", | |
"comment": "Bobo T. Clown", | |
"password": "iAm@Cl0wN!!!" | |
} |
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
{ | |
"id": "frank", | |
"comment": "Frank Belson", | |
"password": "sP3nC3r4Hire!" | |
} |
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
{ | |
"id": "clowns", | |
"members": [ "bobo", "frank" ] | |
} |
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
"[System Access]" | out-file c:\delete.cfg | |
"PasswordComplexity = 0" | out-file c:\delete.cfg -append | |
"[Version]" | out-file c:\delete.cfg -append | |
'signature="$CHICAGO$"' | out-file c:\delete.cfg -append | |
secedit /configure /db C:\Windows\security\new.sdb /cfg c:\delete.cfg /areas SECURITYPOLICY | |
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
use_inline_resources | |
action :add do | |
log "My name is #{new_resource.name}" | |
registry_key "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System" do | |
values [{ | |
:name => "LegalNoticeCaption", | |
:type => :string, |
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
use_inline_resources | |
action :add do | |
log "My name is #{new_resource.name}" | |
registry_key "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System" do | |
values [{ | |
:name => "LegalNoticeCaption", | |
:type => :string, | |
:data => "#{new_resource.title_text}" |
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
powershell_script "Install IIS" do | |
code "add-windowsfeature Web-Server" | |
action :run | |
end | |
service "w3svc" do | |
action [ :enable, :start ] | |
end | |
cookbook_file 'c:\inetpub\wwwroot\Default.htm' do |
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
<powershell> | |
#https://gist.github.com/vinyar/6735863 | |
# below two commands are known to fail for arbitrary reasons | |
try { winrm quickconfig -q } | |
catch {write-host "winrm quickconfig failed"} | |
try { Enable-PSRemoting -force} | |
catch {write-host "Enable-PSRemoting -force failed"} | |
write-host 'setting up WinRm'; |
OlderNewer