Link to home
Start Free TrialLog in
Avatar of SAM2009
SAM2009Flag for Canada

asked on

With PowerShell, how to read value in csv file but without specific caracter?

Hi,

I have a csv file with Name and Account informations like this:

Name,Account
John,Domain\John
Eric,DomainEric

How can I put Account in a variable but without "Domain\"?
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sam,
Another thing you can do is open the .csv file in notepad then then do an
Edit>Replace
Find What:   Domain\
Replace: (leave blank)
Click "Replace All"
Now you can use account variable the way you need to.
Avatar of SAM2009

ASKER

Thanks!