This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Description: AU-5 evidence — EC2 audit alerts for disk capacity and auditd failures | |
Parameters: | |
AlertEmail: | |
Type: String | |
Description: Email address to receive audit alerts (SNS subscription) | |
InstanceId: | |
Type: String | |
Description: EC2 InstanceId that emits CWAgent metrics (disk_used_percent) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set private IP (You can also get it dynamically if you want) | |
$privateIp = (Get-NetIPAddress -AddressFamily IPv4 | Where-Object {$_.InterfaceAlias -notlike "vEthernet*"}).IPAddress | |
Write-Host "Checking IIS Site Bindings..." -ForegroundColor Cyan | |
try { | |
Import-Module WebAdministration | |
Get-WebBinding | Select-Object protocol, bindingInformation | |
} catch { | |
Write-Host "IIS not installed or unable to load WebAdministration module." -ForegroundColor Yellow | |
} |