clear-host $NomVariable = "Domain\MonLogin" $partieAvant = $NomVariable.Split('\')[0] $partieApres = $NomVariable.Split('\')[1] Write-Output $partieAvant Write-Output $partieApres