Split

From MyWiki
Revision as of 15:13, 27 August 2014 by George2 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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]