Classes/Main/Port.Class.ps1
Class Port { [string]$Name [string]$Alias [bool]$Shutdown = $false [int]$NativeVlan [int]$UntaggedVlan [int]$VoiceVlan [int[]]$TaggedVlan [string]$OperStatus [string]$AdminStatus [string]$Speed [string]$Duplex [string]$Type [string]$Mode [string]$StpMode [bool]$BpduGuard = $false [bool]$DhcpSnoopingTrust = $false ##################################### Initiators ##################################### # Initiator Port([string]$Name) { $this.Name = $Name $this.NativeVlan = 1 $this.UntaggedVlan = 1 } Port([string]$Name, [string]$Type) { $this.Name = $Name $this.Type = $Type if (($Type -ne "other") -and ($Name -notmatch "(com|vsb)")) { $this.NativeVlan = 1 $this.UntaggedVlan = 1 } } } |