I would like to replace “-” at 10th character with “,” and split in to columns in three columns A(first 10 characters) and B(remaining characters) and Third column C will have AD-group users.
Could you please let me know how to achieve this task. I am new to Powershell.
Is it a csv file or is it a text file? You could read the content of a text file with Get-Content and treat every line as needed or you could import your csv file with Import-CSV and treat the specific column as needed.