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
# | |
# Wait for AWS instance to be ready for SSM commands | |
# | |
instance_id=$1 | |
echo "waiting for instance $instance_id..." | |
pingStatus=$(aws ssm describe-instance-information \ | |
--instance-information-filter-list key=InstanceIds,valueSet=$instance_id \ | |
--query 'InstanceInformationList[].PingStatus' \ | |
--output 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
Script NewCluster { | |
TestScript = { | |
$computerObject = Get-CimInstance -ClassName Win32_ComputerSystem | |
$cluster = Get-Cluster -Name $Using:clustername -Domain $computerObject.Domain | |
if($cluster) { | |
return $true | |
} else { | |
return $false |
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
# Install local cert with certutil | |
Script localcert { | |
SetScript = { | |
$certPath = "C:\Installers\$using:cert" | |
$result = $(certutil -p $using:cert_pass -csp "Microsoft Enhanced RSA and AES Cryptographic Provider" -importpfx $certPath) | |
if($result -like '*FAILED*') { | |
Throw "certutil failed for local cert $certPath $result" | |
} | |
} | |
TestScript = { $false } |