Reputation: 21
Current script is:
cmdkey /add:(name of my NAS) /user:network\(username on NAS) /pass:(password for username on NAS)
New-PSDrive -Name "E" -Root "\\(name of my NAS)\(name of shared folder)" -Persist -PSProvider "FileSystem"
This will map one of the shared folders that the user has access to on the NAS as a local drive on the PC. Of course if there are more than 1 shared folders the user has access to on the NAS and wants them mapped, then the
New-PSDrive -Name "E" -Root "\\(name of my NAS)\(name of shared folder)" -Persist -PSProvider "FileSystem"
part needs to be used/written again but now with a different letter than "E"
This is pretty complicated even on just a select few PCs. I want to rewrite the script in a way that once the system knows the NAS user account (username + password), it will automatically map all the network folders they have access to as local drives on the PC.
Any ideas how this could work? I know in AD you have a way to do this but none of my PCs are domain-joined and I don't have an AD domain.
Upvotes: 0
Views: 146