Skip to content

Category: Tech

PowerShell Function: Fix-MAC

function Fix-MAC { [CmdletBinding(DefaultParameterSetName=’Upper’)] [OutputType([string])] Param ( # MAC Address [Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true, ValueFromRemainingArguments=$false, Position=0)] [Parameter(ParameterSetName=’Upper’)] [Parameter(ParameterSetName=’Lower’)] [Parameter(ParameterSetName=’IOS’)] [string[]]$MACS, [Parameter(Mandatory=$False, ParameterSetName=’Lower’)] [switch]$Lower, [Parameter(Mandatory=$False, ParameterSetName=’IOS’)] [switch]$IOS…