Locations

Get-XpLocation

Syntax

Get-XpLocations [[-LocationNames] <String[]>] [-Timeout <int>] [<CommonParameters>]

Description

The Get-XpLocations command delivers location objects.

Without parameters, Get-XpLocations returns all locations of the XPhone Connect Server. However, one or more location names can also be specified, which are then searched for on the XPhone Connect Server.

By default, the command only provides the name of the location and its description. Using the Select-Object command however, all available features of the locations can be provided (see examples).

Parameter

  • -LocationNames <String[]>
    • This optional parameter specifies one or more location names. Locations are then searched for on the XPhone Connect server using these names.

    • Several names are provided separated by a comma.

      Hint

      A distinction must be made between upper- and lower-case letters!

    • The wildcard symbol * can be used both at the beginning and at the end of the character string to be searched for. For example, -LocationNames main* returns

      • the locations with the name “main location”

      • and “Main extension”.

    • If names contain special characters such as spaces or commas, the names must be placed in quotation marks:

      -XpLocations -LocationNames "Frankfurt am Main","Haupt-Standort"
      
  • -Timeout <int>
    • Timeout in minutes.

    • If a command takes too long (e.g. due to too many data records or similar), this command can be aborted with this parameter after the specified time.

  • <CommonParameters>

Input

This command does not support input via the pipeline and is therefore usually at the beginning of a command chain.

Output

The Get-XpLocations command does not deliver any CFGBranch-type objects.

CFGBranch:

Property

Supported values

Description

String

FunctionAnnouncement

BranchActive
BranchInactive
FunctionClient

BranchActive
BranchInactive
FunctionCollaboration

BranchActive
BranchInactive
FunctionContactList

BranchActive
BranchInactive
FunctionFax

BranchActive
BranchInactive
FunctionAnnouncement

BranchActive
BranchInactive
FunctionLanguage

BranchActive
BranchInactive
FunctionMailbox

BranchActive
BranchInactive
FunctionMobileControl

BranchActive
BranchInactive
FunctionPasswordComplexity

BranchActive
BranchInactive
FunctionPresence

BranchActive
BranchInactive
FunctionSms

BranchActive
BranchInactive
FunctionTelephony

BranchActive
BranchInactive
FunctionVoicemail

BranchActive
BranchInactive

Id

-

Name

String

ExtensionData

-

UtcOffset

-

Example

  • Show all locations:

    >Get-XpLocations
    
  • Show all locations starting with “Ha”:

    >Get-XpLocations Ha*
    
  • Show the Main location and Secondary location locations:

    >Get-XpLocations Hauptstandort,Nebenstelle
    
  • Show the Main location 2 (contains blanks!):

    >Get-XpLocations "Hauptstandort 2"
    

Set-XpLocations

Syntax

Set-XpLocations [-Objects] <CFGBranch[]> [<CommonParameters>]

Description

The cmdlet Set-XpLocations saves the transferred CFGBranch objects from Get-XpLocations in the XPhone Connect Server.

All changes to the object are transferred to the XPhone Connect Server immediately and without further inquiry and stored there.

Warning

The changes can then no longer be reversed. A thorough review of the changed data is therefore essential.

Parameter

  • -Objects <CFGBranch[]>
    • The list of CFGBranch objects originates from Get-XpLocations, is changed and then redirected via the pipeline to Set-XpLocations (see input).

    • This parameter is mandatory; otherwise no locations can be saved on the XPhone Connect Server.

  • -Timeout <int>
    • Timeout in minutes.

    • If a command takes too long (e.g. due to too many data records or similar), this command can be aborted with this parameter after the specified time.

  • <CommonParameters>

Input

The input type is the type of object which can be transferred to Set-XpLocations via pipelining:

  • CFGBranch

Output

The Set-XpLocations command does not deliver any objects.

Example

The general procedure for changing location data is as follows:

  1. Get desired locations >Get-XpLocations

  2. Change features >foreach{$_.Eigenschaft = „Wert“;$_}

  3. Save location changes in XPhone Connect Server >Set-XpLocations

It is important to check the data again after step 2 (Change) before saving them in the XPhone Connect Server. The 3rd step (Save) is initially dispensed with. All objects are then output in their new status on the PowerShell console but not saved.

Example Set-XpLocations

  1. Deactivating faxes at all locations:

    >Get-XpLocations | foreach{$_.FunctionFax = "BranchInactive";$_} | Set-XpLocations
    

Hint

In order to check the changes before saving in this example, step 3 (Set-XpLocations) is left out. This results in the following command:

>Get-XpLocations | foreach{$_.FunctionFax = "BranchInactive";$_}
  1. Analog to 1: Activating faxes at all locations:

    >Get-XpLocations | foreach{$_.FunctionFax = "BranchActive";$_} | Set-XpLocations
    
  2. Deactivating faxes and voicemails at the Main location and Secondary location:

    >Get-XpLocations „Hauptstandort“,“Nebenstelle“ | foreach{$_.FunctionFax = "BranchInactive"; $_.FunctionVoiceMail = "BranchInactive";$_} | Set-XpLocations
    

Have you found a mistake on this page?

Or is something not formulated well or too vague? Then we look forward to receiving an e-mail, preferably with a suggestion for improvement, to doku@c4b.de. Thank you very much!