Split
From MyWiki
http://www.powershelladmin.com/wiki/Powershell_split_operator
To get split to work properly to separate out a username with spaces :
PS C:\scripts> $one = 'ab cd ef' PS C:\scripts> $two = $one -Split(' ') PS C:\scripts> $two[0]