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
type osResource struct { | |
Bucket string | |
Object string | |
Generation int64 | |
} | |
type Policy struct { | |
Cid string | |
LinuxInstallParams string | |
WindowsInstallParams 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
if ! _resp="$(curl --retry 15 --retry-delay 10 -sf -H "Authorization: Bearer ${SSM_CS_AUTH_TOKEN}" -H "User-Agent: $userAgent" "$URL")" ; then | |
errcho "Failed getting url (exit status $?)..." | |
"$@" | |
echo "${_resp}" | |
echo _resp | |
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
import csv | |
from pytablewriter import MarkdownTableWriter | |
DSC_FILE_NAME = "w2019MonoLayerZero.ps1" | |
CSV_FILE_NAME = "DSCResources.csv" | |
def mdtable(value_matrix): | |
""" | |
Generate Markdown table for resource. |
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
$user = Read-Host -Prompt 'Input username' | |
$password = Read-Host -Prompt 'Input password' | |
$csv_path = Read-Host -Prompt 'Input path to inventory CSV' | |
$yaml_module = "powershell-yaml" | |
if ($null -eq (Get-InstalledModule -Name $yaml_module -ErrorAction SilentlyContinue)) { | |
Install-Module $yaml_module | |
} |