~mjorgensen/windows-dotfiles

4d04cc6091bdabad4fd2dfc6bbae9c0dbe1229b2 — Matthew Jorgensen 21 days ago 778c720
Add function to get details about AWS SES send quotas
1 files changed, 8 insertions(+), 0 deletions(-)

M functions.ps1
M functions.ps1 => functions.ps1 +8 -0
@@ 54,4 54,12 @@ function Get-NameFromSID {
    $objSID = New-Object System.Security.Principal.SecurityIdentifier($SID)
    $objUser = $objSID.Translate([System.Security.Principal.NTAccount])
    Write-Host "Resolved user name: " $objUser.Value
}

function Get-AwsSesSendQuota {
    $result = (aws ses get-send-quota)
    $obj = $result | ConvertFrom-Json

    Write-Host "Sent last 24 hours: " $obj.SentLast24Hours
    Write-Host "Quota used (%): " $($obj.SentLast24Hours / $obj.Max24HourSend * 100)
}
\ No newline at end of file