For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
packer build packer.json 2>&1 | sudo tee output.txt | |
tail -2 output.txt | head -2 | awk 'match($0, /ami-.*/) { print substr($0, RSTART, RLENGTH) }' > sudo ami.txt |
<# | |
.SYNOPSIS | |
Gets a PowerShell Credential (PSCredential) from the Windows Credential Manager | |
.DESCRIPTION | |
This module will return a [PSCredential] object from a credential stored in Windows Credential Manager. The | |
Get-StoredCredential function can only access Generic Credentials. | |
Alias: GSC |
-- | |
-- Author: Thiago R. Santos | |
-- Create date: Aug 3rd 2008 | |
-- Description: Returns the contents of a given table | |
-- in JavaScript Object Notation. | |
-- Params: | |
-- @table_name: the table to execute the query | |
-- @registries_per_request: equivalent to "select top N * from table" | |
-- | |
-- replacing N by the actual number |
#! /powershell/ | |
Set-StrictMode -Version Latest | |
$log = 'c:\cloudfu.txt' | |
Add-Content $log -value "Initial Execution Policy: [$(Get-ExecutionPolicy)]" | |
Set-ExecutionPolicy Unrestricted | |
Add-Content $log -value "New Execution Policy: [$(Get-ExecutionPolicy)]" | |
Add-Content $log -value "Path variable [${env:Path}]" | |
Add-Content $log -value "PSModulePath variable [${env:PSModulePath}]" |