Right now in our environment we have 4 different SANS or servers that host users home drives. We are consolidating all of them into 1 new SAN location. I can easily get a users home directory but how to I parse it? Here are actual home drive paths.
\\MG-FS02\smitht01$
\\MG-FS02\users\chiuk$
\\MG-FSR03\Shares\Users\langl
How do I change everything "before" the user name to a new path? There is never a set number of backslashes and there is not always a $ at the end of the users name.
\\NewPath\UserName$ is what I need to set them all too (with or without the $ sign).