Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Mapping Drive to share on untrusted domain

Reply
 
Old 01-09-2009   #1 (permalink)
Steven


 
 

Mapping Drive to share on untrusted domain

I want to map a drive to a server that is in another domain - untrusted. In
windows, a window pops up asking for credentials and I just put in my
credentials for that domain. I want to create a script and part of this
would require mapping a drive to a share on this server in the untrusted
domain. Can someone show me what to do?

Thanks!



My System SpecsSystem Spec
Old 01-09-2009   #2 (permalink)
tojo2000


 
 

Re: Mapping Drive to share on untrusted domain

On Jan 9, 1:38*pm, "Steven" <Syk...@xxxxxx> wrote:
Quote:

> I want to map a drive to a server that is in another domain - untrusted. *In
> windows, a window pops up asking for credentials and I just put in my
> credentials for that domain. *I want to create a script and part of this
> would require mapping a drive to a share on this server in the untrusted
> domain. *Can someone show me what to do?
>
> Thanks!
Try something like this:

New-PSDrive $drive_letter FileSystem \\path\to\share -Credential ''

Which is short for

New-PSDrive -Name $drive_letter -psprovider FileSystem -root \\path\to
\share -Credential ''

You have to put something after -Credential, so if you don't have a
username to put, then just leave it empty. If you provided a string
instead of a PSCredential object then when it pops up the dialog it
will use that string as a username.
My System SpecsSystem Spec
Old 01-09-2009   #3 (permalink)
Charlie Russel - MVP


 
 

Re: Mapping Drive to share on untrusted domain

In addition to what Tojo posted, the good old "net use" commands can also be
use:

net use <driveletter>: \\servername\share /user:domain\user

You'll be prompted for the password, or you can actually embed it in the
command, though that has obvious security issues.

--
Charlie.
http://msmvps.com/blogs/xperts64
http://mvp.support.microsoft.com/profile/charlie.russel

"Steven" <Sykong@xxxxxx> wrote in message
news:eFgSiKqcJHA.4660@xxxxxx
Quote:

>I want to map a drive to a server that is in another domain - untrusted.
>In windows, a window pops up asking for credentials and I just put in my
>credentials for that domain. I want to create a script and part of this
>would require mapping a drive to a share on this server in the untrusted
>domain. Can someone show me what to do?
>
> Thanks!
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Mapping drive from Vista (Workgroup Mode) to Vista (Domain-joined) Vista networking & sharing
Drive mapping & UNC Vista networking & sharing
Vista Business Having problems maintaining mapping to Vista Ultimate Share Vista networking & sharing
Trouble Mapping a Windows 2003 Server Share Vista General
Mapping non Domain drives Vista networking & sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46