Questions tagged [net-use]

Net-use connects or disconnects a computer or a shared drive and controls net connections.

Net-use connects or disconnects a computer or a shared drive and controls net connections.

121 questions
1
vote
1 answer

Find Drive Letter Using Net Use

What I'm trying to do Launch PSExec to open CMD on a remote computer passing "Net Use * \Server\Share" command Launch PSExec again and remove the share i just created. I can't seem to figure out how to get the drive letter that the wild card…
HiTech
  • 913
  • 1
  • 16
  • 34
1
vote
2 answers

"net use * /delete" equivalent in C#?

I'm using the following lines below to create a connection to a shared network location, but the problem is with any connections active (I think), network.MapNetworkDrive("..") will throw an error: Multiple connections to a server or shared…
jerryh91
  • 1,777
  • 10
  • 46
  • 77
1
vote
2 answers

Shared folder empty after opening with NET USE

I am trying to create a batch file that will map a shared folder on another domain. After some research, I found the NET USE command to map drives. @echo off Net Use M: \\IP\Folder\ /persistent:yes /USER:domain\userID PASS This works great for…
Arm0geddon
  • 466
  • 11
  • 30
1
vote
1 answer

Backslash in the directory path, what is the difference?

I have a batch script that checks to see if a directory exists then maps it, if it does exist. if exist \\server\folder1\%username% net use g: \\server\folder1\%username% Lately the script hasn't been mapping correctly with some computers, on those…
user2517266
  • 335
  • 1
  • 2
  • 6
1
vote
2 answers

How to hide output from net use in Powershell

I'm using this Powershell script to connect a network path: $usrLogin = [Environment]::UserName + "@mydomain.net" $cred = Get-Credential $usrLogin $networkCred = $cred.GetNetworkCredential() $usercred = $networkCred.UserName + '@' +…
Deltahost
  • 107
  • 3
  • 11
1
vote
1 answer

Net use, delete specific drives

I have a question concerning net use. is there a way to delete multiple mapped drives connected to a single host? For example, I want to delete drives X and Y in one go using only one command. Is there a way to delete both X and Y since they share…
JonStanley91
  • 19
  • 1
  • 6
1
vote
0 answers

c# UNC path stills works when using NetUseDel

I am using NetUse to create a connection to a UNC path to enumerate the directories. Upon, NetUseDelete, I need unauthorized exceptions to start happening immediately. Currently, it seems that NetUseDelete's effect is deleted, at least in .NET. The…
Paul Knopf
  • 9,568
  • 23
  • 77
  • 142
0
votes
1 answer

open folder from Network with Powershell

I would like to open a txt.File from a sharedFolder with Powershell. The problem is, that it has to run whether an user is logged on or not. I'm looking for something like net-use. The Program should also check, whether the psDrive exists or…
andreaspfr
  • 2,298
  • 5
  • 42
  • 51
0
votes
1 answer

Unavailable Shared Path using net use via xp_cmdshell

I have been trying to resolve this really weird issue for a while! We have a stored procedure that performs the below (all executed via xp_cmdshell which is run using the proxy account that is set to the service account) exec xp_cmdshell 'net use…
L.D
  • 255
  • 1
  • 2
  • 9
0
votes
0 answers

How to map a local drive in a windows docker container with net use?

I currently try to map a local folder/drive on my Windows Docker container. I try to achieve this with the net use command. For example to map drive C to the letter M: net use M: \\localhost\c$ If I do so, I get the following error message: System…
0
votes
0 answers

SMB user changer c#

I have NAS server on OMV 6. And users on Win 10. On NAS I have users: student1 and student2(actualy much more) and personal folders for each. Users on Win 10 use CMD: net use * /del /y net use \\192.168.1.1 /user:username…
IIIaKa
  • 1
0
votes
0 answers

Not able to access External server from inside container

I am running a docker window container which is running a window service . It is trying to load a file from On-Premise file server. I have tried to map the file server path inside container using "net use" command with different credentials who have…
0
votes
1 answer

what are 'NET USE' possible outputs?

The question is : what are the NET USE possible outputs? You can drown yourself with websites explaining how to use NET USE command, but not a single one about what is coming out of it. In my case I'm interested in the various error messages, and…
0
votes
0 answers

(net use) What is better- UNC path or map drive?

I am writing a java application which iterates over all the files in a network share and searches the files for some keywords. I am aware I can use the smbj library, but I want to use native windows/linux mounting. I am using the net use command on…
Shubham
  • 98
  • 1
  • 11
0
votes
1 answer

SQL server : mapping network drive - Insufficient system resources exist to complete the requested service

Hello I am trying to create a new plan on SQL server to backup all my database. My goal is to backup them to a network drive thus if I do have some trouble with my server, I will be able to restore databases to other server thanks to backup present…
DonKnacki
  • 427
  • 4
  • 11
1 2 3
8 9