Foley Posted May 31, 2017 #1 Share Posted May 31, 2017 Hey, für jeden User den wir in unserem System anlegen müssen im nachhinein noch 2 Buttons angepasst werden, zum einen die Beschriftung des Buttons als auch die Befehlszeile. ich würde das gerne via Powershell lösen. Unter Userdata finde ich nur folgende Einträge kann ich noch tiefer in die Einstellungen gehen um solche Einstellungen via Skript vorzunehmen. Würde das tägliche manuelle verändern der Buttons erheblich vereinfachen LG Link to comment Share on other sites More sharing options...
Most Valued User Sebastian Dreier Posted May 31, 2017 Most Valued User #2 Share Posted May 31, 2017 Hallo RandomSwyxUser, was genau meinst du mit 2 Buttons? Kannst du mir ein Beispiel geben bzw. wo wird das normalerweise konfiguriert? Link to comment Share on other sites More sharing options...
Foley Posted June 1, 2017 Author #3 Share Posted June 1, 2017 In der Swyxware Administration kann man in den Eigenschaften der Benutzer unter Tasten '/ Verknüpfungstasten ,die Verknüpfungen vornehmen. Ihc würde gerne die Befehlszeile und die Beschriftung anpassen. LG Link to comment Share on other sites More sharing options...
Foley Posted June 7, 2017 Author #4 Share Posted June 7, 2017 hat sonst noch jemand eine Idee? Link to comment Share on other sites More sharing options...
Most Valued User Sebastian Dreier Posted July 13, 2017 Most Valued User #5 Share Posted July 13, 2017 Hallo RandomSwyxUser, inzwischen habe ich endlich die Zeit gefunden mir dein Problem einmal näher anzusehen. Hier eine mögliche Lösung: Connect-IpPbx Get-IpPbxUser | ForEach-Object { $currentUserEntry = $_ Write-Host "Updating user '$($currentUserEntry.Name)'..." # Get user data $userData= Get-IpPbxUserData -UserEntry $currentUserEntry # Update the configuration of the first shortcut key $userData.m_UrlKeySettings[0].Title = "Swyx Website" $userData.m_UrlKeySettings[0].CommandLine = "http://www.swyx.com" $userData.m_UrlKeySettings[0].CurrentDirectory = "" # Save changes Set-IpPbxUserData -UserEntry $currentUserEntry -UserData $userData } Link to comment Share on other sites More sharing options...
Foley Posted July 31, 2017 Author #6 Share Posted July 31, 2017 Get-IpPbxUserData -Username "user name" # Update the configuration of the first shortcut key $userData.m_UrlKeySettings.Title[0] = "Swyx Website" $userData.m_UrlKeySettings.CommandLine[0] = "http://www.swyx.com" $userData.m_UrlKeySettings.CurrentDirectory[0] = "" # Save changes Set-IpPbxUserData -UserName "user name" -UserData $userData Wenn ich das für einen User ausführe, schmeißt er keine Fehlermeldung jedoch speichert er den Eintrag auch nicht. LG Link to comment Share on other sites More sharing options...
Most Valued User Sebastian Dreier Posted July 31, 2017 Most Valued User #7 Share Posted July 31, 2017 Hallo RandomSwyxUser, so funktioniert es für einen Benutzer: # Connect to the local IpPbx server via Windows Authentication Connect-IpPbx # TEST: Hardcoded username $userName = "user name" # Get and validate user $userEntry = Get-IpPbxUser -UserName $userName if (!$userEntry) { Write-Error "User '$($userName)' could not be found" return } # Get and validate user data $userData = Get-IpPbxUserData -UserEntry $userEntry if (!$userData) { Write-Error "UserData could not be received for user '$($userEntry.Name)'" return } # Update the configuration of the first shortcut key Write-Host "Updating user '$($userEntry.Name)'..." $userData.m_UrlKeySettings[0].Title = "Swyx Website" $userData.m_UrlKeySettings[0].CommandLine = "http://www.swyx.com" $userData.m_UrlKeySettings[0].CurrentDirectory = "" # Save changes Set-IpPbxUserData -UserEntry $userEntry -UserData $userData $userEntry.Update($true) Link to comment Share on other sites More sharing options...
Most Valued User Sebastian Dreier Posted July 31, 2017 Most Valued User #8 Share Posted July 31, 2017 und so für alle IpPbx Benutzer (ausgenommen buildin Benutzer wie CTI+): # Connect to the local IpPbx server via Windows Authentication Connect-IpPbx # Go through all the user and update the first shortcut key Get-IpPbxUser | ForEach-Object { # Contains the current user object $userEntry = $_ # Get and validate user data $userData = Get-IpPbxUserData -UserEntry $userEntry if (!$userData) { Write-Error "UserData could not be received for user '$($userEntry.Name)'" return } # Update the configuration of the first shortcut key Write-Host "Updating user '$($userEntry.Name)'..." $userData.m_UrlKeySettings[0].Title = "Swyx Website" $userData.m_UrlKeySettings[0].CommandLine = "http://www.swyx.com" $userData.m_UrlKeySettings[0].CurrentDirectory = "" # Save changes Set-IpPbxUserData -UserEntry $userEntry -UserData $userData $userEntry.Update($true) } Link to comment Share on other sites More sharing options...
Foley Posted August 1, 2017 Author #9 Share Posted August 1, 2017 Danke Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.