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 - How to pass credentials to Authentication Window on the web.

Reply
 
Old 05-03-2007   #1 (permalink)
Vlince


 
 

How to pass credentials to Authentication Window on the web.

Hello all,

In powershell, how can I pass the credentials to a authenticaiton window of
a web site.

Assuming I wish to nagivate to www.yahoo.com/admin and I get prompted for
the network username and password, how can I provide these two fields with
the proper value from PowerShell without being prompted for the dialog window.

I know I'll have to save the password in some secure file but for now I just
want to know if its fesable.

Thanks in advance


My System SpecsSystem Spec
Old 05-04-2007   #2 (permalink)
Marco Shaw


 
 

Re: How to pass credentials to Authentication Window on the web.

Vlince wrote:
> Hello all,
>
> In powershell, how can I pass the credentials to a authenticaiton window of
> a web site.
>
> Assuming I wish to nagivate to www.yahoo.com/admin and I get prompted for
> the network username and password, how can I provide these two fields with
> the proper value from PowerShell without being prompted for the dialog window.
>
> I know I'll have to save the password in some secure file but for now I just
> want to know if its fesable.
>
> Thanks in advance
>


Check this out:
http://scriptolog.blogspot.com/2007/...web-forms.html
My System SpecsSystem Spec
Old 05-04-2007   #3 (permalink)
Vlince


 
 

Re: How to pass credentials to Authentication Window on the web.

Thank you Marco unfortunately this is not what I was looking for :-(

Although the article is great (I've bookmarked it hehehe) what I'm looking
for is:

How to pass domain\username and password to the Network Authentication
Dialog that prompts you when you try to access a particular web site.

Thanks

My System SpecsSystem Spec
Old 05-04-2007   #4 (permalink)
Marco Shaw


 
 

Re: How to pass credentials to Authentication Window on the web.

Vlince wrote:
> Thank you Marco unfortunately this is not what I was looking for :-(
>
> Although the article is great (I've bookmarked it hehehe) what I'm looking
> for is:
>
> How to pass domain\username and password to the Network Authentication
> Dialog that prompts you when you try to access a particular web site.
>
> Thanks
>


Is it something you just need to run on your local computer to automate
something? I wonder if you can use the AutoIt
(http://www.autoitscript.com/) COM interface to do this...
My System SpecsSystem Spec
Old 05-04-2007   #5 (permalink)
Marco Shaw


 
 

Re: How to pass credentials to Authentication Window on the web.

> Is it something you just need to run on your local computer to automate
> something? I wonder if you can use the AutoIt
> (http://www.autoitscript.com/) COM interface to do this...


Yup, sure looks like it can be done:

[start IE here with the com object or whatever to the proper page]
$autoitx=new-object -com autoitx3.control
$autoitx.winactivate("some dialog box title","")
$autoitx.send("test_user")
[etc.]

Tried the above, and got "test_user" written to the username box.

VBScript also has some send keys functionality though, but I don't know
if it can change the "active window focus" like autoit can.
My System SpecsSystem Spec
Old 05-05-2007   #6 (permalink)
Don Jones [MVP]


 
 

Re: How to pass credentials to Authentication Window on the web.

Yes, VBScript can. WshShell.AppActivate.

--
Don Jones
Windows PowerShell MVP
Founder: www.ScriptingAnswers.com
Co-Author: "Windows PowerShell: TFM"

"Marco Shaw" <marco.shaw@_NO_SPAM_gmail.com> wrote in message
news:OEOFiNnjHHA.4324@TK2MSFTNGP05.phx.gbl...
>> Is it something you just need to run on your local computer to automate
>> something? I wonder if you can use the AutoIt
>> (http://www.autoitscript.com/) COM interface to do this...

>
> Yup, sure looks like it can be done:
>
> [start IE here with the com object or whatever to the proper page]
> $autoitx=new-object -com autoitx3.control
> $autoitx.winactivate("some dialog box title","")
> $autoitx.send("test_user")
> [etc.]
>
> Tried the above, and got "test_user" written to the username box.
>
> VBScript also has some send keys functionality though, but I don't know if
> it can change the "active window focus" like autoit can.


My System SpecsSystem Spec
Old 05-05-2007   #7 (permalink)
Don Jones [MVP]


 
 

Re: How to pass credentials to Authentication Window on the web.

You can't, at least not using what's built into PowerShell. It doesn't have
any way of activating that GUI dialog box and sending keystrokes to it.

--
Don Jones
Windows PowerShell MVP
Founder: www.ScriptingAnswers.com
Co-Author: "Windows PowerShell: TFM"

"Vlince" <Vlince@discussions.microsoft.com> wrote in message
news:4420ECDC-7DF4-4038-B569-3D1B90235A62@microsoft.com...
> Hello all,
>
> In powershell, how can I pass the credentials to a authenticaiton window
> of
> a web site.
>
> Assuming I wish to nagivate to www.yahoo.com/admin and I get prompted for
> the network username and password, how can I provide these two fields with
> the proper value from PowerShell without being prompted for the dialog
> window.
>
> I know I'll have to save the password in some secure file but for now I
> just
> want to know if its fesable.
>
> Thanks in advance
>


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Help - Credentials PowerShell
How do I pass credentials for email to be sent through Exchange 2003 PowerShell
How to pass credentials? PowerShell
Why the Value not able to Pass to a Function PowerShell
RDP Authentication Credentials to Server 2003 Vista General


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