Jump to content

does Set-ipPbxUserPicture work?


ZimmiTheSwissGuy
 Share


Recommended Posts

Hello Guys

 

I'm trying to change the ProfilePicture of each User in the Swyx-Software.

The WhatIf tells me he did it, but nothing changes....

 

I have 3 Pictures for each location where the employer could work. 

I have a parameter in the CSV, so i can sort them.

 

Can anybody help me ? Here my Code

 

Import-Module IpPbx


Connect-IpPbx -ServerName voip01

$Path = 'C:\_SETUP\SPEEDDIAL\SpeedDial_20200929.txt' 
$Members = Get-IpPbxGroupMember -GroupName "Jeder"

$Keys = Import-Csv -Path $Path -Delimiter ";" -Header 'Name','Nummer', double.Idx,'Standort'  -Encoding UTF8
$ARL = Import-Csv -Path $Path -Delimiter ";" -Header 'Name','Nummer', double.Idx,'Standort'  -Encoding UTF8 | ? standort -like 'ARL' 
$SIS = Import-Csv -Path $Path -Delimiter ";" -Header 'Name','Nummer', double.Idx,'Standort'  -Encoding UTF8 | ? standort -like 'SIS' 
$ZWI = Import-Csv -Path $Path -Delimiter ";" -Header 'Name','Nummer', double.Idx,'Standort'  -Encoding UTF8 | ? standort -like 'Zwi' 
  


Foreach ($Member in $Members) {

    Foreach ($Key in $Keys) {

        $NameKey = New-IpPbxSpeedDialKey -ClearBeforeDialing -DialImmediately:$false -Number $key.Nummer -Label $key.Name -WhatIf

        Add-IpPbxSpeedDialKey -SpeedDialKey $NameKey -UserName $Member.Name -SpeedDialKeyId $Key.Idx -WhatIf

    }

}

Foreach($ARLPicture in $ARL){

    Set-IpPbxUserPicture -UserName $ARLPicture.Name -Path C:\_Scripts\Pictures\Benutzerbild-A.png -Overwrite -WhatIf


}

Foreach($SISPicture in $SIS){

    Set-IpPbxUserPicture -UserName $SISPicture.Name -Path C:\_Scripts\Pictures\Benutzerbild-S.png -Overwrite -WhatIf


}

Foreach($ZWIPicture in $ZWI){

    Set-IpPbxUserPicture -UserName $ZWIPicture.Name -Path C:\_Scripts\Pictures\Benutzerbild-Z.png -Overwrite -WhatIf


}

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.