![]() One of the things I noticed in the 2011 Scripting Games is that some people work way too hard on their solutions. ![]() Other things appear to be difficult until you find the “correct” approach. ![]() ![]() One thing that is rather interesting about Windows PowerShell is that some things are really super easy. At least I have plenty of years experience using that language. If I have to write a script to do this, I may as well go back to using VBScript. I have spent all afternoon on something that should really be a simple one-liner. For some reason, I appear to be picking up some kind of extra crap that is added by Windows PowerShell. The problem is that this is not really working the way I want it to. If there is, I want to change it to the new name, and then export the CSV data to a new file. Inside there, I should be able to use an if statement to see if there is a match with the old name. I have been reading all of your articles this week, and I think I should be able to use Import-CSV to read the CSV file, and use a foreach loop to evaluate each row in the CSV file. The problem is that we are moving one of our office locations, and I need to quickly change the old location name to the new location name. Hey, Scripting Guy! I have a comma-separated value (CSV) file that contains user names, user groups, and organizational unit (OU) assignments. Summary: Learn how to search for and replace words in a CSV file by using Windows PowerShell.
0 Comments
Leave a Reply. |