簡體   English   中英

有沒有人有啟動和停止 aws ec2 實例的 PowerShell 腳本

[英]Does anyone have a PowerShell script that starts and stops aws ec2 instances

有沒有人有啟動和停止 aws ec2 實例的 PowerShell 腳本?

參數 ( [字符串] $Filter = "xxxxx*" )

$CurrentDate = (Get-Date -Format "yyyyMMdd.0.0")

$instances = Get-EC2Instance -Filter @(@{name = 'tag:Name'; values = "xxxx"}) Start-EC2Instance $_.instances.instanceid

查看 AWS 提供的此 cmdlet:“Start-EC2Instance Cmdlet”, https://docs.aws.amazon.com/powershell/latest/reference/items/Start-EC2Instance.html

此外,請查看 PowerShell Gallery 以了解 PowerShell 的 AWS 工具: https://www.powershellgallery.com/packages/AWS.NetCore/。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM