The Context: Powershell launched as a domain admin.

From this Powershell window, Is it possible to open c$ of a remote box (\server\c$) in explorer.exe without asking for credential (using the current credential) ?

Thanks

link|improve this question

25% accept rate
feedback

2 Answers

Yes, if you cd into \\server\c$ you can run invoke-item on the current directory.

cd \\server\c$
ii .

Or you can invoke the directory directly

invoke-item \\server\c$
link|improve this answer
Thanks Andy! But it does not work from a powershell (launched as domain admin in my case) – Xavier C Dec 9 '09 at 20:15
feedback

I found the solution:

Thanks for your help Andy.

I found the solution, reading this article from windowsitpro.com

I had to modify a key in the register of the domain admin profile on my workstation. Since i'm not the only admin in my company, I included the key modification in my script. And i'm not asked for credential! Beautiful! Here you go:

$RegKey ="HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\advanced"
$user = $env:username
$domain = $env:userdomain
set-ItemProperty -path $RegKey -name SeparateProcess -value 1
net use \\$args\c$ /user:$domain\$user
explorer.exe \\$args\c$

I used net use, but there are many ways to do this, for example you can also use RUN AS

runas /user:domain\username explorer.exe

Hope that's help

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.