I have run into an issue with a piece of software we are using where users with a single quote ' in their name is causing the application to crash. I contacted support for the application and they said the only way to fix this is to remove or change the name of the affected users. (the software is using SQL and is obviously vulnerable to SQL injection and they still neglected my suggestions. It's internal so I am not overly concerned and it isn't housing anything important)
I currently have two users with a single quote ' in their name and I need to be able to change their username by removing it and I will also need to change their userprofile path on their local machines.
How do I go about renaming the user and moving the users current userprofile path to a new one while retaining all the content of it? I know how to rename the user but I am uncertain on the correct method of changing their userprofile path.