Powershell script to find invalid tags of ec2 instances of aws.

Get-EC2Tag -Filter @{ Name='resource-type';Value='instance'} |
ForEach-Object {if($_.Value -notmatch "^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$") {
Write-Output "The instance $($_.ResourceId) has invalid value for the tag $($_.Key) : $($_.Value)" }}
Tags: No tags
0

Add a Comment

Your email address will not be published. Required fields are marked *