Skip to content

Instantly share code, notes, and snippets.

@chandra-goka
Created May 12, 2021 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chandra-goka/57162f59dc692e316ccea3932998a56b to your computer and use it in GitHub Desktop.
Save chandra-goka/57162f59dc692e316ccea3932998a56b to your computer and use it in GitHub Desktop.
"script": "Set-ExecutionPolicy Bypass -Scope CurrentUser -Force\n[System.Net.ServicePointManager]::
SecurityProtocol = @(\n [System.Net.SecurityProtocolType]::Tls;,\n
[System.Net.SecurityProtocolType]::Tls12;\n)\n
$ScriptResponse = Invoke-WebRequest \"https://vmc-ssm-agent-install.s3-us-west-2.amazonaws.com/ssm-agent-install.ps1\"
-UseBasicParsing\n$Script = [System.Text.Encoding]::UTF8.GetString($ScriptResponse.Content)\n$ScriptBlock = [Scriptblock]::Create($Script)\n
Invoke-Command -ScriptBlock $ScriptBlock -ArgumentList
($args + @(\"wqdWaDWEe6/KVn6vNxNl\", \"49a31a45-d9b6-4d89-a727-1f9d537646c0\", \"eu-west-2\"))"
execution:: 767cf564-41f5-41e0-846e-7f3058c7ac21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment