有没有办法使用aws cli获取最新的Windows 2012R2基础AMI ID?
类似Get-EC2ImageByName -Names WINDOWS_2012R2_BASEPowershell的东西.我想在Linux中使用它.
我尝试过使用AMI id,
aws ec2 describe-images --owners amazon --filters "Name=name,Values=Windows_Server-2012-R2_RTM-English-64Bit-Base-*"但感觉就像是黑客.在Powershell中有更好的方法吗?
我正在尝试在PowerShell中替换包含括号的字符串.但是,当我尝试这样做时,它无法正常工作.
知道我哪里出错了吗?什么是我该做的更换包含字符串()与-replace在PowerShell中?
$a='Some Text with (round) brackets. This text is long.'
$ch="with (round) brackets."
$b="this text"
$a -replace $ch,$b
Run Code Online (Sandbox Code Playgroud)
输出:
Some Text with (round) brackets. This text is long.
Run Code Online (Sandbox Code Playgroud)