The AWS Tools for Windows PowerShell lets you perform many of the same actions available in the AWS SDK for .NET. You can use it from the command line for quick tasks, like controlling your Amazon EC2 instances.
PS C:\> Start-EC2Instances -InstanceId i-10a64379
The Windows PowerShell scripting language lets you compose scripts to automate your AWS service management. The following example loops through a log directory on an EC2 instance, finds files older than one week, and then archives any non-empty ones to Amazon S3 before deleting the old log file from disk.
foreach ($i in Get-ChildItem C:\Logs)
if ($i.CreationTime -lt ($(Get-Date).AddDays(-7)))
if ($i.Length -gt 0)
Write-S3Object -BucketName mylogbucket -Key Logs/$i -File $i.FullName
Lastly, with direct access to AWS services from Windows PowerShell, your management scripts can now take advantage of everything the AWS cloud has to offer.
# Catch an error and page all operators subscribed to the Amazon SNS topic
Publish-SNSMessage -TopicArn arn:aws:sns:us-east-1:365928882516:OperationsError -Subject "Database Backup Failure" -Message "(details...)"
# Publish a custom metric to your Amazon CloudWatch dashboard
$dat = New-Object Amazon.CloudWatch.Model.MetricDatum
$dat.Timestamp = (Get-Date).ToUniversalTime()
$dat.MetricName = "New Posts"
$dat.Unit = "Count"
$dat.Value = $newPostCount
Write-CWMetricData -Namespace "Usage Metrics" -MetricData $dat