Jump to content

User eine E-Mail-Adresse hinzufügen


Telekomiker
 Share


Go to solution Solved by Sebastian Dreier,

Recommended Posts

Hallo zusammen,

 

wenn ich einem User via 

$user.EmailAddr = "test@test.de"
Update-IpPbxUser $user

 

eine E-Mail Adresse hinzufügen möchte, taucht die Adresse nur in der Standard-Voicemail auf aber nicht im Eigenschaften-Dialog des Users. (Siehe Screenshots)

Gibt es einen anderen Befehl um das Feld E-Mail-Adresse in den Administratoreigenschaften zu befüllen? Mit dem User-Import Tool scheint es ja zu funktionieren.

image.png.dfebf4572f1236a5e0767259c5a6c273.png

 

image.png.980c85c2334afb37ded5127c6ed81a6b.png

 

 

MfG

Link to comment
Share on other sites


  • Most Valued User
  • Solution

Hallo Telekomiker,

 

der folgende PowerShell Code sollte alles erklären:

 

$emailAddress = "sebastian.dreier@awacons.com"

# Connect to local SwyxWare Server via Windows Authentication
Connect-IpPbx

# Get a user
$userEntry = Get-IpPbxUser -UserName Sebastian

# Change voicemail email address
$userEntry.EMailAddr = $emailAddress

# Update user email address
# 1. At first we have to remove the current mail address
# 2. Add new email address
$userEntry.UserEmailAddressesEntryCollection.RemoveAll()
$mailEntry = New-Object "UserEmailAddressesEntry"
$mailEntry.Address = $emailAddress
$mailEntry.Type = [UserEmailAddressType]::PersonalEmailAddress
$userEntry.UserEmailAddressesEntryCollection.Add($mailEntry)

# IMPORTANT
# The UserEmailAddressesEntryCollection MUST NOT have more than one entry

# Save changes
Update-IpPbxUser -UserEntry $userEntry

# Cleanup
Disconnect-IpPbx

 

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.