Hello Everyone,
I'm currently working on a project in which I'm doing a mass data copy and I need to auto create a folder structure based on the user profile that the file was originally under when copying the
data to the new location.
Which would end up having the folder structure end up looking like this at the end:
rootdir\(MachineName)\(UserProfileName)\File.etxention
Is there a way through powershell to grab the user profile location that the file exists under and put it into a .csv file using the export-csv command? This is for a mass data pull of a number
of .pst files from under the different user profiles on the network into a singular location.
The current script I've used is able to grab the file paths, machine names, owners and file size of the found .pst files but currently the missing piece is being able to parse out the user profile name for the file which it exists under in order to finish
up the script I'm creating to auto-create a folder structure in which to pull the data into from across the network.
Any thoughts or possibilities would be appreciated, been bashing my head against this problem for 4 days now.