I am newbie to DNAC templating. When I am creating a script to read any selected interfaces from a sw and trying to configure selected ports with 2 switchport command it gives error on those switchport command.
any suggestions ?
#foreach ($interface in ${interfaces})
#if ($interface.interfaceType == "Physical" && $interface.mediaType == "10/100/1000BaseTX")
interface $interface.portName
switchport mode access
switchport access vlan 701
#end
#end