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 - Re: Connecting to a share that requires authentication

Reply
 
Old 10-04-2008   #1 (permalink)
Pete Zerger (MVP)


 
 

Re: Connecting to a share that requires authentication

Hello Michael,

Using a RunAs Account would be the most apparent and appropriate way from
my perspective. Alternatively, you could also run the script from a proxy
agent that you assign a domain account (with rights to the share) as the
Agent Action Account.



Regards,

Pete Zerger, MCSE(Messaging) | MCTS(SQL 2005) | MCTS(Opsmgr) | MVP - Opsmgr
URL:http://www.systemcenterforum.org
User Group: http://www.systemcenterusergroup.com
MP Catalog: http://www.systemcenterforum.org/mps

Quote:

> Hello,
>
> I have a VBS script that connects to a remote share in order to copy
> files from it. The share requires authentication, which is done in
> VBS using this code:
>
> Set oNetwork = CreateObject("Wscript.Network")
> oNetwork.MapNetworkDrive strDriveId,
> strDrivePath,,strUser,strPass
> From googling, I see how to clone this process in PS, except that the
> PS connection will not accept the user/password parameters for the
> call to MapNetworkDrive. It only recognizes a mapping process using
> the first two parameters.
>
> Is there a way, within PS itself, to connect to a remote share that
> requires authentication? This cannot be interactive, the script is
> intended to run automatically on a schedule.
>
> Thanks.
>
> mp
>


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
My server requires authentication Vista mail
how to send email if my SMTP server requires authentication VB Script
Re: Connecting to a share that requires authentication PowerShell
Mapped drive to 2003 DC always requires authentication after reboo Vista account administration
My Server requires authentication Vista mail


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