Skip to content

Instantly share code, notes, and snippets.

@thebentern
Last active August 1, 2016 14:23
Show Gist options
  • Save thebentern/d17ec6a90a23b895fb00943a839023b0 to your computer and use it in GitHub Desktop.
Save thebentern/d17ec6a90a23b895fb00943a839023b0 to your computer and use it in GitHub Desktop.
S3 Uploader Powershell
$key = "mykey"
$secretKey = "mysecretkey"
$bucketName = "bucketName"
Set-AWSCredentials -AccessKey $key -SecretKey $secretKey -StoreAs MyProfileName
foreach ($file in Get-ChildItem "D:\Exceed Extracts\Batch")
{
if ($file.Length -gt 0)
{
Write-S3Object -BucketName $bucketName -File $file.FullName -ProfileName MyProfileName
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment