The phrase: "AWS cmdlets do not support the -WhatIf switch." should be clarified:
-New-EC2Tag Respects the -whatif when running cmdlet, or when called in a procedure with [CmdletBinding(SupportsShouldProcess=$true)]
Remove-EC2Tag Respects -whatif fromcmdlet but not when called from a procedure with [CmdletBinding(SupportsShouldProcess=$true)]
"myrenamescript" does a new-ec2tag , remove-ec2tag -tag -force
So I called myrenamescript.ps1 -newtag $tag -whatif
New tag poped up with the proper whatif message and not created
Old tag was deleted.
ran script again myrenamescript.ps1 -newtag $tag
New tag was created, old tag was deleted
from Powershell pompt (not in script)
remove-ec2tag -tag -whatif
tag was NOT removed. got proper warning message
Closing this issue or pull request in advance of archiving this repo. For more information about the decision to archive this repo (and others in the 'awsdocs' org), see the announcement on the AWS News Blog.
page where error shows up: https://docs.aws.amazon.com/powershell/latest/userguide/pstools-discovery-aliases.html
The phrase: "AWS cmdlets do not support the -WhatIf switch." should be clarified: -New-EC2Tag Respects the -whatif when running cmdlet, or when called in a procedure with [CmdletBinding(SupportsShouldProcess=$true)] Remove-EC2Tag Respects -whatif fromcmdlet but not when called from a procedure with [CmdletBinding(SupportsShouldProcess=$true)] "myrenamescript" does a new-ec2tag , remove-ec2tag -tag -force
So I called myrenamescript.ps1 -newtag $tag -whatif New tag poped up with the proper whatif message and not created Old tag was deleted. ran script again myrenamescript.ps1 -newtag $tag New tag was created, old tag was deleted from Powershell pompt (not in script) remove-ec2tag -tag -whatif
tag was NOT removed. got proper warning message