Hi GauravPande_23,
You can try this to create drives for other users.
Start-Process -FilePath powershell.exe -Credential $cred -ArgumentList "New-PSDrive -Name $driveLetter -PSProvider 'FileSystem' -Root $drivePath -Persist -ErrorAction Stop"
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
New-PSDrive -Name $driveLetter -PSProvider "FileSystem" -Root $drivePath -Persist -Credential $cred -ErrorAction Stop
I am using above command for network drive mapping.
However,the mapped drives are only visible to the user who is executing the script,not for all the users.
I want visibility to all users
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.
Hi GauravPande_23,
You can try this to create drives for other users.
Start-Process -FilePath powershell.exe -Credential $cred -ArgumentList "New-PSDrive -Name $driveLetter -PSProvider 'FileSystem' -Root $drivePath -Persist -ErrorAction Stop"