So im stuck here. I've done this a bunch of times in SQL but never in PS. I have a full name like "John Smith" that i am writing a script to auto change password when its expired. However, AD does not like "John Smith" so i need to change it to "JSmith".
In the past for SQL ive used a combination of charindex, length, substring etc etc. But for the life of me i am drawing a blank on how to do this in PS. Any help would be great!