header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

passing creds and get-child item question
Last Post 10 Jun 2008 03:40 AM by marco.shaw. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
brandanfUser is Offline
New Member
New Member
Posts:7

--
06 Jun 2008 03:28 PM  

"Is there any way to pass credentials when enumerating a remote UNC? So far, I have to go to Start - Run, enter the UNC and authenticate when prompted. Only then can I do a get-childitem on that UNC within PowerShell. Otherwise I'm told the UNC doesn't exist."

I may not have gone where I intended to go, but I think I have ended up where I needed to be.
-Douglas Adams
marco.shawUser is Offline
Co-Community Director
Basic Member
Basic Member
Posts:195
Avatar

--
10 Jun 2008 03:40 AM  

If I follow, you can use new-psdrive with a credential object to mount the remote UNC before trying to use gci to enumerate it.

 

Marco

*Microsoft MVP - Windows PowerShell: http://www.microsoft.com/mvp
*PowerGadgets MVP: http://www.powergadgets.com/mvp
*Blog: http://marcoshaw.blogspot.com
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer