Skip to content

Instantly share code, notes, and snippets.

@techthoughts2
Last active February 21, 2022 03:28
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 techthoughts2/dcb752f2b706b6859665db599d8fba18 to your computer and use it in GitHub Desktop.
Save techthoughts2/dcb752f2b706b6859665db599d8fba18 to your computer and use it in GitHub Desktop.
$a = @(
'AWS.Tools.Common'
'AWS.Tools.CloudFormation'
'AWS.Tools.CloudFormation'
'AWS.Tools.CloudWatch'
'AWS.Tools.CostExplorer'
'AWS.Tools.EC2'
'AWS.Tools.Installer'
'AWS.Tools.S3'
'AWS.Tools.SecretsManager'
'AWS.Tools.SecurityToken'
'AWS.Tools.SQS'
'AWS.Tools.StepFunctions'
'AWS.Tools.SNS'
)
Import-Module AWS.Tools.Installer
foreach ($item in $a) {
Install-AWSToolsModule -Name $item -CleanUp -Force
}
#######################################################
$all = Get-Module AWS.tools* -ListAvailable
$parent = 'AWS.Tools.Installer'
Uninstall-Module -Name $parent -AllVersions
$reinstall = @(
'AWS.Tools.Common',
'AWS.Tools.CloudWatch',
'AWS.Tools.CostExplorer',
'AWS.Tools.S3',
'AWS.Tools.SecretsManager',
'AWS.Tools.SQS',
'AWS.Tools.StepFunctions',
'AWSLambdaPSCore'
)
foreach ($item in $reinstall) {
Uninstall-Module -Name $item -AllVersions -Force
}
Install-Module -Name $parent -Repository PSGallery -SkipPublisherCheck -Force
foreach ($item in $reinstall) {
Install-Module -Name $item -Repository PSGallery -SkipPublisherCheck -Force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment