Change in locations/configuration groups

All users of a location or configuration group are to be listed here and then changed. This example uses the fallback scenarios, but can be modified as required for other changes.

Search by location/configuration group

Variant 1

You can perform a search with the following command:

Get-XpUsers Berlin

You receive a list of all users who have something to do with Berlin. The search corresponds to the search in the XPhone Server:

pwrshll-srch

However, as you can see, the user information is also displayed. All user fields are taken into account in this search. Therefore, for example, users with the last name Berlin are also displayed in the list. If you also want to filter for locations and configuration groups with the above command, you must give them a unique name (e.g. Location_Berlin, Config_Hamburg or similar).

Variant 2

As you can see, variant 1 is prone to errors for information that is configured in the user. With variant 2, the names of the locations and configuration groups are irrelevant, as the unique IDs of the locations and configuration groups are used.

$id = Get-XpConfigGroups "Hauptstandort" -ConfigGroupNames "Berlin" | Select-Object Id | foreach { $_.Id }
Get-XpUsers | Where-Object -Property ParentGuid -eq $id

Change for all user objects found

The search of variant 2 above is extended in this example to set the call forwarding for the fallback scenario.

$id = Get-XpConfigGroups "Hauptstandort" -ConfigGroupNames "Berlin" | Select-Object Id | foreach { $_.Id }
$u = Get-XpUsers | Where-Object -Property ParentGuid -eq $id
$n = $u | foreach { $_.Accountname }
Get-XpLineForwardData -ForwardMode "noanswer" -UserNames $n | foreach{$_.NoAnswerDelaySeconds = 30; $_.NoAnswerTargetInternal = 'forward'; $_.NoAnswerTargetInternalCallNumber = "+4989840798666"; $_.NoAnswerTargetExternal = 'off';$_} | Set-XpLineForwardData

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!