Mi primer script powershell y es usando Internet Explorer

Aunque tengo que explicar mucho, este script se autentica a Windows Live y sube un archivo. Falta algo si … el copy al Clipboard para que el Paste de ExecWB funcione.

Enlaces
http://msdn2.microsoft.com/en-us/library/ms691264.aspx
http://msdn2.microsoft.com/en-us/library/ms683930(VS.85).aspx
http://keithhill.spaces.live.com/blog/cns!5A8D2641E0963A97!680.entry

param(
[string]$uname="",
[string]$live_login_url="http://login.live.com/login.srf"
)

#$creds = get-credential $uname
#$pass = $creds.GetNetworkCredential().Password
$pass= ""

$ie=new-object -com internetexplorer.application
$ie.visible=$true
$ie.navigate($live_login_url)

while($ie.ReadyState -ne 4) {start-sleep -m 100}
$ie.document.getElementById("login").value=$uname
$ie.document.getElementById("passwd").value = $pass
$ie.document.getElementById("f1").submit()

start-sleep -m 5000
while($ie.ReadyState -ne 4) {start-sleep -m 100}
$skydrive_url = "http://skydrive.live.com"
$ie.navigate($skydrive_url)

start-sleep -m 5000
while($ie.ReadyState -ne 4) {start-sleep -m 100}
$ie.navigate($ie.LocationUrl.Replace("home.aspx","upload.aspx/Public?ref=1"))

start-sleep -m 5000
while($ie.ReadyState -ne 4) {start-sleep -m 1000}
$file_release = "d:CLRProfiler.EXE"

while($ie.ReadyState -eq 3) {start-sleep -m 1000}
$ie.document.getElementById("fileUpload1").select()
#$ie.ExecWB(45,2)
$ie.ExecWB(13,2)
#$ie.document.getElementById("aspnetForm").submit()

#while ($ie.ReadyState -ne 4) {start-sleep -m 1000}

Esta entrada fue publicada en Sin categoría. Guarda el enlace permanente.

9 respuestas a Mi primer script powershell y es usando Internet Explorer

  1. Unknown dijo:

    Amberdigital Branch,Southern Stars Enterprises Co is specializing in the development and manufacturing of ad players, advertisement player and LCD advertisings. Established in 1996, we have explored and developed the international market with professionalism. We have built a widespread marketing network, and set up a capable management team dedicated to provide beyond-expectation services to our customers.

    amberdigital Contact Us
    Southern Stars Enterprises Co (Hong Kong Office)
    Add:3 Fl, No.2, Lane 2, Kam Tsin Tsuen, Sheung Shui, Hong Kong
    Tel:+852 2681 4099
    Fax:+852 2681 4586
    Southern Stars Enterprises Co (Shenzhen Office)
    Add:DE, 16/F, Building 2, Nanguo Tower, Sungang Road, Shenzhen, China
    Tel:+86 755 2592 9100
    Fax:+86 755 2592 7171
    E-mail:sstar@netvigator.com
    website:www.amberdigital.com.hk
    alibaba:amberdigital.en.alibaba.com[b

  2. Unknown dijo:

    Be wow gold cheapest wow power leveling under the best single-site!

  3. Unknown dijo:

    Hi,Do you have used LCDs, used flat screens and secondhand LCDs? Please go here:www.sstar-hk.com(Southern Stars).We are constantly buying re-usable LCD panels and working for LCD recycling.The re-usable panels go through strictly designed process of categorizing, checking, testing, repairing and refurbishing before they are re-used to make remanufactured LCD displays and TV sets.Due to our recent breakthrough in testing and repairing technology of LCD, we can improve the value for your LCD panels.
    website:www.sstar-hk.com[jbafdjagbjhahg]

  4. Unknown dijo:

    Hi,Do you need advertising displays, screen advertisings, digital sign, digital signages and LCDs? Please go Here:www.amberdigital.com.hk(Amberdigital).we have explored and developed the international market with professionalism. We have built a widespread marketing network, and set up a capable management team dedicated to provide beyond-expectation services to our customers.
    amberdigital Contact Us
    website:www.amberdigital.com.hk
    alibaba:amberdigital.en.alibaba.com[ciafcgjjdjibab]

Deja un comentario