Questions tagged [drive-mapping]
40 questions
33
votes
2 answers
Net.exe use 'Error: A command was used with conflicting switches.' while using /savecred
I am trying to use following command to map a drive in persistent mode, and I don't want it to ask login credentials everytime I reboot the machine:
net use P: \\server\folder Password123 /user:user123 /savecred /persistent:yes
But I am getting…

sabertooth1990
- 1,048
- 1
- 13
- 19
11
votes
2 answers
Cannot add "-persist" to New-PSDrive - getting error "network resource type is not correct"
As the title says, if I try to add -persist to the cmdlt, it returns an error:
New-PSDrive : The network resource type is not correct
At line:1 char:1
+ New-PSDrive -Name P -Root ...
+…

RSchreib
- 121
- 1
- 1
- 6
7
votes
3 answers
New-PSDrive does not support credentials?
I am trying to map a drive in PowerShell 2.0 and getting this error?
New-PSDrive –Name ftp –PSProvider FileSystem –Root “\\server\folder” -Credential $credential
The provider does not support the use of credentials. Perform the operation again…

BlueChippy
- 5,935
- 16
- 81
- 131
6
votes
3 answers
WNetAddConnection2 returns 1219
I am using WNetAddConnection2 and WNetCancelConnection2 to map or unmap drives.
What i am trying to do is as follows:
I mapped a folder(eg:Folder1) on server(eg:myserver). so the path is \\myserver\Folder1 and i map it to drive X.
Now i want to…

R3D3vil
- 681
- 1
- 9
- 22
6
votes
1 answer
Getting command line output in VBScript (without writing to files)
I'm using VBScript, and my goal is to be able to substitute a drive letter for a path of my choosing. I need the D drive, and if it's not available I need to check if it's already mapped to the right spot; then notify the user if it's not. I found…

213897
- 1,561
- 4
- 15
- 16
5
votes
3 answers
Jenkins can't see mapped drive
I'm getting the following error when trying to execute a build in Jenkins:
Started by user anonymous
Building in workspace C:\Users\mryan\git\AML
[AML] $ cmd /c call…

TomSelleck
- 6,706
- 22
- 82
- 151
5
votes
4 answers
Mapped network drive via New-PSDrive disappears after exiting powershell script
I've tried looking for an answer for couple of days with no luck...
I have a powershell (v3.0) script that checks for a Network drive and maps it if it is not already mapped. The script itself works just fine to a certain point, drive is mapped and…

ritzydh
- 51
- 1
- 1
- 2
3
votes
1 answer
How can I map a \\wsl$\ type unc path to a windows drive letter?
I'm using eclipse on windows to connect to files on a wsl, and I have run into what is apparently an eclipse bug which file names such as \wsl$\folder1\pom.xml get mangled.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=577938
A comment in the bug…

Gonen I
- 5,576
- 1
- 29
- 60
3
votes
0 answers
Visual Studio 2017 doesn't see mapped drives
I'm running Visual Studio 2017 on Windows 10 1803 64-bit. I have a mapped drive (H:) and when I try to run an SSIS package that depends on finding files in that drive, it tells me the files can't be found. If I change the code to use a UNC path, it…

Melanie
- 3,021
- 6
- 38
- 56
2
votes
3 answers
How can I get a drive list from a batch file?
I'm trying to get a list of all my mapped drives for a system upgrade and would like to get this info via a batch file. How can I do this?
For Bonus points:
How can I script the mapping of these drives on the new server?

Keng
- 52,011
- 32
- 81
- 111
2
votes
1 answer
Mount Azure Fileshare to Azure VM when VM is created
I'm looking for a solution to mount an Azure Fileshare on to my Azure Virtual Machine (Windows 10) when the virtual machine is created.
There is this guide for manually map the Azure Fileshare to an existing (virtual) machine, and that works fine,…

CMorgan
- 645
- 2
- 11
- 33
2
votes
1 answer
PowerShell - net use doesn't work - issue with variables
I want to map a network resource remotely via net use.
This is my PowerShell code:
$user = Read-Host -Prompt "Enter Username"
$pw = Read-Host -Prompt "Enter Password" -AsSecureString
net use X: \\Server\dir1\dir2 /persistent:no /user:$user $pw
It…

Aerondight
- 127
- 1
- 1
- 8
2
votes
4 answers
Batch file called by scheduled task throws error when scheduled, runs fine when double clicked
I have a batch file that maps a networked drive. About a week or so ago the password expired, so the program calling the batch file started throwing errors.
I've updated the password in the batch file, and when I double click on the batch file, the…

Tim
- 4,051
- 10
- 36
- 60
1
vote
4 answers
how to map a software as a Drive?
I am trying to create a software like Ibackup.com. However, I am not sure how to make the software so that it'll map as a local Harddrive. And i am not sure where to start researching on this. Someone please give me some pointers.

Erwin Yu
- 25
- 2
1
vote
1 answer
How to refer/ map network drive during Task Scheduler/ bat job without user logged in/ mapping?
I have an unexpected challenge.
I have a network drive mapped, let's call it the K: drive. I can also see this drive is \marketing.fakename.blah.com, for example.
Anyway I'm trying to run a .bat file and scripts on a remote server via Windows Task…

user45867
- 887
- 2
- 17
- 30