>
Param( [string]$computer=$env:COMPUTERNAME ) #end param
functionGet-StatusFromValue { Param($SV) switch($SV) { 0 { “ Disconnected” } 1 { “ Connecting” } 2 { “ Connected” } 3 { “ Disconnecting” } 4 { “ Hardware not present” } 5 { “ Hardware disabled” } 6 { “ Hardware malfunction” } 7 { “ Media disconnected” } 8 { “ Authenticating” } 9 { “ Authentication succeeded” } 10 { “ Authentication failed” } 11 { “ Invalid Address” } 12 { “ Credentials Required” } Default { “Not connected” } }
} #end Get-StatusFromValue function