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
{ | |
"builders": [{ | |
"type": "amazon-ebs", | |
"region": "us-east-1", | |
"vpc_id": "", | |
"subnet_id": "", | |
"source_ami": "ami-12345678", | |
"instance_type": "t2.large", | |
"ami_name": "my-windows2008-ssh", | |
"communicator": "ssh", |
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
$EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\Config.xml" | |
$xml = [xml](get-content $EC2SettingsFile) | |
$xmlElement = $xml.get_DocumentElement() | |
$xmlElementToModify = $xmlElement.Plugins | |
foreach ($element in $xmlElementToModify.Plugin) | |
{ | |
if ($element.name -eq "Ec2SetPassword") | |
{ | |
$element.State="Enabled" |
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
##################################################################### | |
# New-SelfSignedCertificateEx.ps1 | |
# Version 1.2 | |
# | |
# Creates self-signed certificate. This tool is a base replacement | |
# for deprecated makecert.exe | |
# | |
# Vadims Podans (c) 2013 - 2016 | |
# http://en-us.sysadmins.lv/ | |
##################################################################### |
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
<powershell> | |
write-output "Running User Data Script" | |
write-host "(host) Running User Data Script" | |
Set-ExecutionPolicy Unrestricted -Scope LocalMachine -Force -ErrorAction Ignore | |
# Don't set this before Set-ExecutionPolicy as it throws an error | |
$ErrorActionPreference = "stop" |
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
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> | |
<!-- | |
For other language: Instead of `ace/mode/ruby`, Use | |
Markdown -> `ace/mode/markdown` | |
Python -> `ace/mode/python` | |
C/C++ -> `ace/mode/c_cpp` | |
Javscript -> `ace/mode/javascript` | |
Java -> `ace/mode/java` | |
Scala- -> `ace/mode/scala` |