Skip to content

Instantly share code, notes, and snippets.

@mefellows
Created April 23, 2015 14:24
Show Gist options
  • Save mefellows/924b779eb10f8074b579 to your computer and use it in GitHub Desktop.
Save mefellows/924b779eb10f8074b579 to your computer and use it in GitHub Desktop.
Credulous Powershell wrapper
If ($args[0] -eq "source" ) {
$res = iex "$credulous source mfellows@onegeek -force" | out-string
Write-Host "Exporting AWS environment into shell"
iex $($res)
If ( $LastExitCode -eq 0) {
Write-Host $res
} else {
Write-Error "Failed to load credentials into environment."
Exit 1
}
} else {
iex "$credulous $args"
}
# You could also do this...
# iex $(.\credulous_windows_386.exe source mfellows@onegeek -force | out-string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment