Teams
Get-XpTeams
Syntax
Get-XpTeams [[-TeamNames] <string[]>] [-Timeout <int>]
Description
The Get-XpTeams command retrieves team objects from the XPhone Connect Server. If no parameters are specified, the command returns all teams.
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.
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.
Input
This command does not support input via the pipeline and is therefore 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
Alle Teams:
>Get-XpTeams
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 transferred to the XPhone Connect Server immediately and without prompting and saved there.
Warning
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.
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.
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:
Get desired teams with the help of
>Get-XpTeams
.Change features
>foreach{$_.Eigenschaft = „Wert“;$_}
Or with
Add-/Remove-XpTeamMembers
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 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.
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
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 $teamsNewExplanation:
Searches for Max and Erika Mustermann on the XPhone Connect server and stores them in the variable
$users
.Searches for the Sales and Marketing teams on the XPhone Connect server and stores them in the
$teams
variable.Adds all users from
$users
to the teams in$teams
as members and stores the changed teams in the variable$teamsNew
.Now saves the changed teams on the XPhone Connect server.
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
-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 theFromObservers
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.
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.
-Users <CFGUser[]>
The parameter is mandatory.
It specifies which users should be removed from the teams.
-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 $teamsNewCompletely empty the “My Team” team:
>$teams = Get-XpTeams "Mein Team" >$teamsNew = Remove-XpTeamMembers $teams -Clear >Set-XpTeams $teamsNew
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!