Jump to content

Powershell Telefonbuch Export ohne Builtin User und Gruppen ?


SvenS

Recommended Posts

  • Most Valued User

Hallo,

 

ich versuche gerade eine Telefonbuchdatei für das DECT500 zu erstellen mit Hilfe von Powershell.

Prinzipiell funktioniert das auch, aber ich habe immer die BuiltIn-User wie z.B. MEM und alle Gruppen in der csv-Datei enthalten. Gibt es eine Möglichkeit diese beim Export auszuklammen ?

Mit folgendem Befehl exportiere ich die Datei.

import-module ippbx
connect-ippbx
Get-IpPbxPhonebookEntry -All | Export-IpPbxPhonebook -Path \\TESTSWYX\Directory\phonebook.csv

Den -All Parameter verwende ich um die User und das Globale Telefonbuch zu bekommen.

 

Gruß Sven 

Link to comment
Share on other sites


  • Most Valued User

Hallo Sven,

 

eine Filterung vor dem Export ist leicht möglich wie das folgende Beispiel zeigt:

Get-IpPbxPhonebookEntry -All | ForEach-Object {

    # Remove all groups
    if ($_.EntityID.m_eQualifiedEntityType.ToString() -eq "Group")
    {
        return
    }

    # Remove MEM user
    if ($_.Name -eq "MobileExtensionManager")
    {
        return
    }

    # Output to pipe
    $_

} | Export-IpPbxPhonebook -Path phonebook.csv

 

Kind regards

 

Sebastian Dreier

Link to comment
Share on other sites


Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.