Questions tagged [drive-mapping]

37 questions
32
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…
8
votes
1 answer

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 ... +…
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,355
  • 16
  • 73
  • 126
6
votes
2 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
  • 663
  • 1
  • 7
  • 21
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,501
  • 3
  • 15
  • 16
5
votes
2 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,233
  • 18
  • 71
  • 132
4
votes
3 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
  • 41
  • 1
  • 2
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
  • 2,901
  • 5
  • 32
  • 51
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
  • 48,571
  • 31
  • 77
  • 109
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
  • 97
  • 1
  • 1
  • 7
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
  • 3,929
  • 7
  • 33
  • 59
1
vote
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
  • 362
  • 3
  • 18
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…
1
vote
1 answer

How to obtain UNC drive info on "Disconnected Network Drive"

We run some processes in a distributed computing environment. Processes on one machine need to communicate information with processes on other machines. One of those piecies of information is the location of certain files. Thus, a process on one…
David I. McIntosh
  • 1,724
  • 2
  • 17
  • 42
1
2 3