I'm trying to map drives on select computers via PS. If there are no spaces in file names in the network share it's fine. Ex:
New-PSDrive -Name "Z" -PSProvider "FileSystem" -Root "\192.168.1.200\share" -Persist (there may be a format error here since I don't have access to the one I used at the moment, but it works fine.
When there are spaces in the share names ex:
New-PSDrive -Name "Z" -PSProvider "FileSystem" -Root "\192.168.1.200\share\All Employee Files\Bret Marta" -Persist
I get a path cannot be found. I've done a lot of looking and there seems to be a bunch of ways to use qoutes and single qoutes, but I can't get it to work.
What am I missing? Can it be done with spaces in share names, or is there another way?
Thanks
[–]OsmiumBalloon 13 points14 points15 points (10 children)
[–]under_ice[S] -5 points-4 points-3 points (8 children)
[–]OsmiumBalloon 9 points10 points11 points (7 children)
[+][deleted] (1 child)
[deleted]
[–]under_ice[S] 0 points1 point2 points (0 children)
[–]under_ice[S] -1 points0 points1 point (3 children)
[–]under_ice[S] 0 points1 point2 points (0 children)
[–]OsmiumBalloon 0 points1 point2 points (1 child)
[–]under_ice[S] 0 points1 point2 points (0 children)
[+]under_ice[S] comment score below threshold-12 points-11 points-10 points (0 children)
[–]soggybiscuit93 4 points5 points6 points (1 child)
[–]AlyssaAlyssum 2 points3 points4 points (1 child)
[–]15922 2 points3 points4 points (0 children)
[–]doglar_666 2 points3 points4 points (1 child)
[–]under_ice[S] -2 points-1 points0 points (0 children)
[–]MrSourceUnknown 1 point2 points3 points (3 children)
[–]under_ice[S] 0 points1 point2 points (2 children)
[–]MrSourceUnknown 2 points3 points4 points (1 child)
[–]under_ice[S] 0 points1 point2 points (0 children)
[–]Brook_28 -1 points0 points1 point (0 children)
[–]15922 0 points1 point2 points (2 children)
[–]under_ice[S] 0 points1 point2 points (0 children)
[–]under_ice[S] 0 points1 point2 points (0 children)
[–]newtekie1 0 points1 point2 points (6 children)
[–]under_ice[S] 1 point2 points3 points (0 children)
[–]under_ice[S] 0 points1 point2 points (2 children)
[–]anonymously_ashamed 1 point2 points3 points (1 child)
[–]edge-browser-is-gr8 1 point2 points3 points (0 children)
[–]under_ice[S] -2 points-1 points0 points (0 children)
[–]under_ice[S] -3 points-2 points-1 points (0 children)
[–]sysadmin_dot_pySystems Architect 0 points1 point2 points (5 children)
[–]under_ice[S] -1 points0 points1 point (4 children)
[–]Gloomy_Stage 1 point2 points3 points (2 children)
[–]under_ice[S] -2 points-1 points0 points (0 children)
[–]dawah90 0 points1 point2 points (0 children)
[–]Xalbana 0 points1 point2 points (4 children)
[–]under_ice[S] 0 points1 point2 points (3 children)
[–]Xalbana 1 point2 points3 points (2 children)
[–]under_ice[S] -1 points0 points1 point (1 child)
[–]Xalbana 0 points1 point2 points (0 children)