Hi,
the variable is a team name but not static.
So it can be Team one but also team ten, its a variable that people can fill in by a text field.
i ask them to fill in the team name, but they can fill it in with or without Team in front
my script works only with the name of the team.
When they fill in "ONE" my script works.
So "Team ONE" should become ONE
$first,$last = ($teaminput.tolower()).Split(" ")
IF([string]::IsNullOrEmpty($last)) {
$team = $first
} else {
$team = $last
}
This also works but when the fill in TeamOne i can not split and make it ONE.
(this also needs to work when its Team Two or Three or Four.)