Teams

Get-XpTeams

Syntax

Get-XpTeams [[-TeamNames] <string[]>] [-Timeout <int>]

Description

This command delivers team objects.

All XPhone Connect Server teams are delivered without parameters.

One or more team names can be provided which are then sought on the XPhone Connect Server.

Parameter

  • -TeamNames <String[]>
    • You can use this optional parameter to specify one or more team names. The XPhone Connect Server then attempts to find teams using these names.

    • Several names are provided separated by a comma.

    • If names include special characters such as blanks or commas, they must be in inverted commas:

      >Get-XpTeams -TeamNames "Team Vertrieb","Vertrieb,Marketing"
      
      • Look for the two teams named Team Sales and Sales,Marketing.

  • -Timeout <int>
    • Timeout in minutes.

Input

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

Output

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

CFGTeamsGroup

Property

Supported values

CurrentWarning

Description

String

ExtensionData

InViewGroup

InViewGroupSorted

MaximumUserCountPerView

Name

String

ObjectGuid

ObserverGroup

ObserverGroupSorted

RoleFirst

RoleSecond

RolesFirst

RolesSecond

TeamType

Workgroup | MonitoringGroup

UtcOffset

–BranchActive | BranchInactive

ViewOption

ViewOptionDefaultView

Example

  1. Alle Teams:

    >Get-XpTeams
    
  2. The Sales and Team3 - Marketing teams:

    >Get-XpTeams Vertrieb,“team3 - marketing“
    
    • The upper and lower case must be disregarded.

Set-XpTeams

Syntax

Set-XpTeams [-Objects] <CFGTeamsGroup[]> [-Timeout <int>]

Description

The command saves the passed CFGTeamsGroup objects from Get-XpTeams in the XPhone Connect Server.

All changes made to the objects are immediately transferred to the XPhone Connect server and saved there without prompting.

The changes can subsequently no longer be reversed. A thorough check of the changed data is therefore unavoidable.

Parameter

  • -Objects < CFGTeamsGroup[]>
    • The parameter is mandatory.

    • The list of CFGTeamsGroupObjects came from Get-XpTeams, was then modified and then piped into Set-XpTeams (see Inputs).

  • -Timeout <int>
    • Timeout in minutes.

Input

The input type is the type of objects that can be pipelined to Set-XpTeams.

  • CFGTeamsGroup

Output

This command does not deliver any objects.

Example

The general procedure for changing team data is as follows:

  1. Get desired teams with the help of >Get-XpTeams.

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

    Or with Add-/Remove-XpTeamMembers

  3. Saving the modified teams in XPhone Connect Server >Set-XpTeams

It is important to check the data again after step 2 before saving it in XPhone Connect Server. This is possible by omitting the 3rd step. All objects are then output to the PowerShell console in their changed state, but not yet saved.

  • Change of name from Team Sales to Team 3 - Sales:

    >Get-XpTeams Vertrieb | foreach{$_.Name = „Team 3 - Vertrieb";$_} | Set-XpTeams
    

Add-XpTeamMembers

Syntax

Add-XpTeamMembers [-Teams] <CFGTeamsGroup[]> [-Users] <CFGUser[]>[-AsObserver] [-Replace] [-Timeout <int>]

Description

The command adds all transferred users (CFGUser) as members to all transferred teams (CFGTeamsGroup). For both monitoring groups and workgroups, the users are added as members by default.

However, if the users are to be added as observers (only available for monitoring groups), the -AsObserver flag must be set.

If all members of the group are to be replaced by the passed users, the Replace flag must be set.

Add-XpTeamMembers alone does not make any changes to XPhone Connect Server. To save the changes, the command Set-XpTeams is used.

Parameter

  • -Teams < CFGTeamsGroup[]>
    • The parameter is mandatory.

    • It specifies to which teams the users should be added.

  • -Users < CFGUser[]>
    • The parameter is mandatory.

    • It specifies which users should be added to the team.

  • -AsObserver <SwitchParameter>
    • The parameter is optional.

    • If this flag is set, the users will be added as observers of the teams.

    • If this flag is not set, the users will be added as members of the teams.

  • -Timeout <int>
    • Timeout in minutes.

If the Add-XpTeamMembers command is given teams of the workgroup type, they will be ignored by using the -AsObserver option. There is no observer for workgroups, so they are not changed in the process.

Input

This command does not support input via the pipeline.

Output

The Add-XpTeamMembers command returns a list of type CFGTeamsGroup[], the returned teams contain the added users.

Example

  1. Adding the users named “Max Mustermann” and Erika Mustermann to the Sales and Marketing teams:

    >$users = Get-XpUsers „Max Mustermann", "Erika Mustermann";
    >$teams = Get-XpTeams „Vertrieb","Marketing";
    >$teamsNew = Add-XpTeamMembers $teams $users;
    >Set-XpTeams $teamsNew;
    

    Explanation:

    1. Searches for Max and Erika Mustermann on the XPhone Connect server and stores them in the variable $users.

    2. Searches for the Sales and Marketing teams on the XPhone Connect server and stores them in the $teams variable.

    3. Adds all users from $users to the teams in $teams as members and stores the changed teams in the variable $teamsNew.

    4. Now saves the changed teams on the XPhone Connect server.

  2. Add the user Max Mustermann to all teams as an observer. (Only affects teams of type monitoring group):

    >$users = Get-XpUsers „Max Mustermann";
    >$teams = Get-XpTeams;
    >$teamsNew = Add-XpTeamMembers $teams $users -AsObserver;
    >Set-XpTeams $teamsNew;
    

Remove-XpTeamMembers

Syntax

Remove-XpTeamMembers [-Teams] <CFGTeamsGroup[]> [-Users] <CFGUser[]> [-FromObservers] [-FromMembers] [-Timeout <int>]

Description

The command removes from all passed teams (CFGTeamsGroup) all passed users(CFGUser) both as members and observers.

If the users should only be removed from the list of observers (only available for monitoring groups), the flag -FromObservers must be set.

Similarly, users will be removed from the list of members if the -FromMembers option is set.

Remove-XpTeamMembers alone does not make any changes to XPhone Connect Server. To save the changes, the command Set-XpTeams is used.

Parameter

All parameter sets:

  • -Teams < CFGTeamsGroup[]>
    • The parameter is mandatory.

    • It specifies from which teams the users should be removed.

  • -FromObservers <SwitchParameter>
    • The parameter is optional.

    • If this flag is set, users will be removed from the list of observers only, but not from the list of members.

    • If teams of type workgroup are passed to the Remove-XpTeamMembers command, they will be ignored by using the FromObservers option. No observer exists for workgroups, so they are not changed in the process.

  • -FromMembers <SwitchParameter>
    • The parameter is optional.

    • If this flag is set, users will be removed from the list of members only, but not from the list of observers.

  • -Timeout <int>
    • Timeout in minutes.

Parameter set specific users:

  • -Users < CFGUser[]>
    • The parameter is mandatory.

    • It specifies which users should be removed from the teams.

Parameterset All Users:

  • -Clear
    • The parameter is mandatory

    • It specifies that all users are removed from the list of observers and members. So the team is completely emptied after execution. Can be restricted to the observers/members with the help of -FromMembers/-FromObservers.

Input

The Remove-XpTeamMembers command does not accept input through the pipeline

Output

The Remove-XpTeamMembers command returns a list of type CFGTeamsGroup[].

The returned teams no longer contain the removed users.

Examples

  • Remove the user “Max Mustermann” from all teams:

    >$users = Get-XpUsers „Max Mustermann";
    >$teams = Get-XpTeams;
    >$teamsNew = Remove-XpTeamMembers $teams $users;
    >Set-XpTeams $teams;
    
  • Completely empty the “My Team” team:

    >$teams = Get-XpTeams "Mein Team";
    >$teamsNew = Remove-XpTeamMembers $teams -Clear
    >Set-XpTeams $teams;
    

Have you found an mistake on this page?

Please send us a hint about this error by mail to doku@c4b.de. Thank you very much!