mapping a drive with NET USE in PowerShell using WEBDAV not working right


i using net use map drive to sharepoint library (using webdav). when in dos command prompt, works perfectly. map drive, drive letter instantly accessible, can list contents dir , works great. when use same command in powershell, drive map, when try run dir against new drive letter, it's not accessible.

code

cls  net use q: "http://mypath/server build requests"  get-childitem q:\  net use q: /delete

error

get-childitem : cannot find drive. drive name 'q' not exist.  @ c:\users\myuser\appdata\local\temp\2\c64dbe78-c74e-401e-b39f-405165a31e13.ps1:5 char:14  + get-childitem <<<<  q:\      + categoryinfo          : objectnotfound: (q:string) [get-childitem], drivenotfoundexception      + fullyqualifiederrorid : drivenotfound,microsoft.powershell.commands.getchilditemcommand

appreciated!

one more update here. can run out of default microsoft powershell ise, whatever going on, it's related powergui.

thanks tommy!



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

some help on Event 540

WMI Repository 4GB limit - Win 2003 Ent Question

Event ID 1302 (error 1307) DFS replication service encountered an error while writing to the debug log file