Hi Michael,
There is a way in Prime to accomplish this. The first rule will be to set up the parse blocks, and then the rules following will be to check for switchport mode access.
S.No1:
Condition Scope Detail:
Configuration
Block Options:
Parse as Block
Block Start Expression: ^interface (?i)(F.*|G.*|T.*) <-- This will start the block on Fast Ethernet, Gig, or Ten Gig interfaces
Condition Match Criteria:
Operator Matches the expression
Value: interface (?i)(F.*|G.*|T.*) <-- Captures the interface
Action Detail
Does Not Match: Does not raise a violation
S.No2:
Condition Scope Detail:
Previously Matched Blocks
Block Options: NONE
Condition Match Criteria:
Operator: Contains the String
Value: switchport mode access
Action Detail:
Matches:
Raise a Violation and Continue
User Defined
Message switchport mode access was found on interface <1.1>
Then for the CLI Fix enter what you want to change.
And that should do it.
Hope this helps,
Brett