Share via

Network drive mapping using powershell commands

Anonymous
2024-03-13T08:34:53+00:00

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

Windows for business | Windows Server | User experience | PowerShell

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.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-03-20T07:55:35+00:00

    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"

    Was this answer helpful?

    0 comments No comments