I am working on a script and I will need to create a folder in the current logged in users documents folder. Since the script will be used by multiple users, I will need to directory to be created in C:\Users\%UserProfile%\Documents but I'm not sure how to specify that the directory should be created in the current logged in users 'Documents' folder.. any ideas?
You can always use the $Home value to build the directory path where you want to put the folder. The $Home variable contains the path to C:\Users\UserProfile (Ex: C:\Users\user1), for each logged in user. So, you could do something like the following to create the directory.