Hello All!
Hoping you can help me out, I am trying to pull the Telephone Number and IPPhone properties from AD objects and update the LineURI string on there Lync user. For some reason I can not get the stupid semicolon ; to properly display like below. I am a novice to scripting i haven't done it probably in about 5 years and i'm rusty on certain syntax, I did research and found some escaping characters for Powershell \ and ' but I can't seem to get it to work.
This is what i'm trying to accomplish:
tel:3035641111;ext:1111
By using this script:
$enabledUsers = Get-CsAdUser testuser
foreach ($user in $enabledUsers)
{
$phoneNumber = $user.Phone
$phoneNumber = $phoneNumber -replace "[^0-9]"
$extNumber = $user.IPPhone
$phonenumber = "TEL:+" + $phoneNumber + ";ext:" + $extNumber
Set-CsUser -Identity $user.Identity -LineUri $phoneNumber
}