-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-MountUserDrive parameter description mentions wrong path #8583
Comments
The docs are correct.
For computers in workgroups, the value of I also fixed the path difference between 5.1 and 7+. I updated the article. |
I'm sorry to reopen but there have been misunderstanding. the issue is not I tested path creation and it is created in SYSTEMROOT no in LOCALAPPDATA. EDIT: |
Investigating |
After investigation, I have discovered:
|
This commit corrects the per-user portion of the path created when using the MountUserDrive option for a PSSession configuration file. For Windows PowerShell, it ensures the string represents what is actually written by placing the environment variables in backticks; the prior description would not actually map to the correct value as PowerShell would incorrectly see the variable as USERDOMAIN_ For PowerShell, the option actually creates a folder for the domain and places a folder per-user inside of that one.
This commit corrects the per-user portion of the path created when using the MountUserDrive option for a PSSession configuration file. For Windows PowerShell, it ensures the string represents what is actually written by placing the environment variables in backticks; the prior description would not actually map to the correct value as PowerShell would incorrectly see the variable as USERDOMAIN_ For PowerShell, the option actually creates a folder for the domain and places a folder per-user inside of that one.
Prerequisites
Version
7.2
Link to affected document
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/new-pssessionconfigurationfile?view=powershell-7.2
Description of the documentation error
-MountUserDrive
describes that default path to be created is:$env:LOCALAPPDATA\Microsoft\Windows\PowerShell\DriveRoots\
however that's likely false, the correct path seems to be
$env:SYSTEMROOT\System32\Microsoft\Windows\PowerShell\DriveRoots\<HOSTNAME>_<USERNAME>
I'm not sure if that applies to Windows PowerShell only or to PS Core as well?
I figured that out from another github issue below:
#5969
Suggested fix
Update
-MountUserDrive
description to point out correct default path for each edition of PowerShell.The text was updated successfully, but these errors were encountered: