I have a text file containing data in the following format:
username1.xxx.xxx.xxx.companyname
username2.xxx.xxx.xxx.companyname
username3.xxx.xxx.xxx.companyname
basically Novell usernames.
I would like to manipulate the data in the text file so that its transformed to simply
username1
username2
username3
ie. everything after the first dot is removed.
I'm sure there's a real simple way to do this, but I'm darned if I can find it. Whenever I pull the content in using
$a = Get-Content C:\Scripts\UserList.txt
all the commands I try to use to manipulate the text can't be used in an array.