Example 2Start-EC2Instance -InstanceId i-12345678
CurrentState InstanceId PreviousState
------------ ---------- -------------
Amazon.EC2.Model.InstanceState i-12345678 Amazon.EC2.Model.InstanceState
This example starts the specified instance.
Example 3@("i-12345678", "i-76543210") | Start-EC2Instance
This example starts the specified instances.
Example 4(Get-EC2Instance -Filter @{ Name="instance-state-name"; Values="stopped"}).Instances | Start-EC2Instance
This example starts the set of instances that are currently stopped. The Instance objects returned by Get-EC2Instance are piped to Start-EC2Instance. The syntax used by this example requires PowerShell version 3 or higher.
Example 5$filter = New-Object Amazon.EC2.Model.Filter
$filter.Name = "instance-state-name"
$filter.Values = "stopped"
(Get-EC2Instance -Filter $filter).Instances | Start-EC2Instance
With PowerShell version 2, you must use New-Object to create the filter for the Filter parameter.
Start-EC2Instance -InstanceId 'i-0abcdef123456' -Region 'us-west-1' -DryRun $true
This example validates permissions for starting an EC2 instance using the DryRun parameter without actually starting the instance. Note: This throws an exception if succeeded which is the expected behavior.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4