Does anyone know a way to use scripting to pass credentials to a network computer or shared folder using either simple batch script or PowerShell?
I'm an IT Tech who frequently has to browse to various network folder locations. I have batch scripts that I like to use. With XP, all I had to do was the following...
A bit fancy for a simple task, but it works regardless of situation. Of course, the meat-and-potatoes of this are simply "explorer.exe \\ThatNetShare\d$". But Windows 7 hangs on this and then fails. Part of the new security model. I think maybe I'm out-of-luck. There might no longer be a way to do this, to thwart the hackers and virus-writers.
You can type " \\ThatNetShare\d$" into an Explorer address bar, and it will prompt you for credentials, if required, and it'll work, but that's tedious. Microsoft intentionally broke the traditional way of passing credentials - and maybe they've gotten rid of it completely?
Does anyone know a way to use scripting to pass credentials to a network computer or shared folder using either simple batch script or PowerShell, that works in Windows 7?
I'm an IT Tech who frequently has to browse to various network folder locations. I have batch scripts that I like to use. With XP, all I had to do was the following...
Code:
cls
IF not %userdomain%==%computername% goto explore
:user
@color 1f
@set /p useris=Type Your Username:
@color 9f
net use \\ThatNetShare\ipc$ /user:MyDomain\%useris%
@echo.
@color 07
:explore
explorer.exe \\ThatNetShare\d$
A bit fancy for a simple task, but it works regardless of situation. Of course, the meat-and-potatoes of this are simply "explorer.exe \\ThatNetShare\d$". But Windows 7 hangs on this and then fails. Part of the new security model. I think maybe I'm out-of-luck. There might no longer be a way to do this, to thwart the hackers and virus-writers.
You can type " \\ThatNetShare\d$" into an Explorer address bar, and it will prompt you for credentials, if required, and it'll work, but that's tedious. Microsoft intentionally broke the traditional way of passing credentials - and maybe they've gotten rid of it completely?
Does anyone know a way to use scripting to pass credentials to a network computer or shared folder using either simple batch script or PowerShell, that works in Windows 7?