Created
March 17, 2022 13:05
-
-
Save stknohg/27ea862b5a3e94b4af4919eeed5329be to your computer and use it in GitHub Desktop.
AWS CloudShellのPowerShellにデフォルトでインストールされる AWSPowerShell.NetCore モジュールを削除するコマンド
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
# CloudShell の $Profile に仕込む想定 | |
if ($env:AWS_EXECUTION_ENV -eq 'CloudShell') { | |
$moduleBase = (Get-Module AWSPowerShell.NetCore -ListAvailable).ModuleBase | |
if ($null -ne $moduleBase) { | |
$modulePath = Split-Path -Parent $moduleBase | |
if (Test-Path $modulePath) { sudo rm -rf $modulePath } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment