I am looking to create a scrip to look up a users information based on the extension listed in the msRTCSIP-Line attribute.
I have the below script but need to incorporate an optional value to allow for the different number ranges:
Get-ADUser -Filter {msRTCSIP-Line -like "tel:$ext"} -Properties Name, Displayname, msRTCSIP-Line, msRTCSIP-UserEnabled | FL Name, Displayname, msRTCSIP-Line, msRTCSIP-UserEnabled
What needs to be added is an IF\Else statement to incorporate the following:
If the extension is greater that 6000 it will need to prefix $ext with +2721404 or +2721406. If the number is less than 6000 then prefix $ext with +2721650.
Hope I have made the requirements clear, assistance will be greatly appriciated.