Create internet explorer object from process ID

Hi,
I want to create a object for open instance of internet explorer and pass username and password to it.
By using the below command I am getting the process object but how can we create internet explorer object from it so that I can access document elements.
gps | ? {$_.mainwindowtitle -match 'Service'} | select name, mainwindowtitle
Thanks
Prasanna

Hi Prasanna,
If you means create IE object and signin automatically with username and password, the script below is for your reference:
$username = "....."
$password = "......"
$ie = New-Object -com InternetExplorer.Application
$ie.visible=$true
$ie.navigate("https://login.live.com/")
while($ie.ReadyState -ne 4) {start-sleep -m 100}
$ie.document.getElementById("i0116").value= $username
$ie.document.getElementById("i0118").value = $password
$ie.document.getElementById("idSIButton9").click()
start-sleep -m 100
gps | ? {$_.mainwindowtitle -match 'Microsoft account'} | select name, mainwindowtitle
The result like:
If there is anything else regarding this issue, please feel free to post back.
Best Regards,
Anna Wang

Similar Messages

  • How to create a Document object from a string.

    If I use the following code, the input String cannot contain "\n", otherwise, it generates errors.
    in the following code, inputXMLString is a String object that has xml content.
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(new InputSource(new StringReader(inputXMLString)));          How can I create a Document object from a string with "\n" in the string?
    Thanks.

    If I use the following code, the input String cannot
    contain "\n", otherwise, it generates errors.That's going to be a huge surprise to thousands of people who process XML containing newline characters every day without errors.
    Perhaps your newline characters are in the middle of element names, or something else that causes your XML to be not well-formed. I'm just guessing here, though, because you didn't say what errors you were getting.

  • Can I create a network object from CIDR format or do I need to use IP - netmask?

    Have a cisco ASA running ASA V 8.3
    Wondering what the correct syntax is or even if it is possible to create a network object from a list of IP's in CIDR format? 
    Typically just do this:
    Create network-object
    object-group network name
    network-object 1.2.3.0 255.255.255.0
    Would like to do this: 
    network-object 1.2.3.0/24
    thanks!

    Hi,
    As far as I know the ASA does not support entering a network/subnet mask in such format in any of its configurations.
    - Jouni

  • Unable to create a Driver object from driver with Media type string CTC PHO

    Hi All,
    I am trying to develop a siebel cti adapter for avaya.
    I have loaded a custom dll into siebel server but it is throwing error "SBL-CSR-00500: Unable to create a Driver object from driver C:\Mydriver\cti.dll with Media-Type-String CTC Phone ".
    It has been long time without any progress.
    Please help
    Thanks
    Nishant

    Hi tomhowell,
    According to your description, my understanding is that you got an error when you created a site from a custom site template after migrading SharePoint 2010 to your server.
    Did you have the original solution file of the site template? Please re-deploy the solution to your SharePoint site, then create a site from the new site template, compare the result.
    Also use  SPDisposeCheck to indentify the memory leak:
    http://archive.msdn.microsoft.com/SPDisposeCheck
    http://www.fewlines4biju.com/2012/11/detected-use-of-sprequest-for.html
    Here are some similar posts for your reference:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/3a25eb86-8415-4053-b319-9dd84a1fd71f/detected-use-of-sprequest-for-previously-closed-spweb-object-please-close-spweb-objects-when-you?forum=sharepointdevelopmentprevious
    http://social.msdn.microsoft.com/Forums/en-US/50ce964f-94a6-4fda-abc0-caa34e7111f1/error-detected-use-of-sprequest-for-previously-closed-spweb-object-occurs-when-new-site-gallery
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Creating new graphics object from a existing one and sending it for print

    Hello,
    i have a graphics object which is big in size, I am creating a new graphics object from the existing one as given below
    //map is a graphic object
    Graphic g1 = (Graphic)map.create(x,y,width,height);
    Graphic g2 = (Graphic)map.create(x,y,width1,height1);
    Graphic g3 = (Graphic)map.create(x,y,width2,height2);
    arrayList.add(g1);
    arrayList.add(g2);
    arrayList.add(g3);
    Now I want to send the graphic object g1,g2,g3 for print in the method
    public int print (Graphics g, PageFormat pf, int idx) throws PrinterException {
    // Printable's method implementation
    if (curPageFormat != pf) {
    curPageFormat = pf;
    pages = repaginate (pf);
    if (idx >= 3)) {
    return Printable.NO_SUCH_PAGE;
    g = (Graphics) arrayList.get(idx);
    return Printable.PAGE_EXISTS;
    This is not working... what is wrong. can anybody suggest..
    I tried standardprint.java to print a object inside a scrollpane, it is not printing the entire diagram. so I am thinking of something like this.... Please let me know what to do....
    Thanks
    Serj

    The easy way to do this is create a copy using Windows Explorer.
    Open the project and go to File > Rename.
    Then you have your 2013 ready made project.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How do you get Internet Explorer 9 from shutting down while trying to print from Smart Print button?

    I'm using Internet Explorer 9, and have the latest Smart Print button on my Bing Bar.  When I click on Smart Print to print a page, it lets me go through the entire process of choosing what I want to print, and lets me click on print, which brings me to the print options, but when I click on the final print button, I get a Microsoft error message saying "Internet Explorer has stopped working" message and it closes down my opened page.  How do I print if I keep getting this message?

    dougiedc wrote:
    It boggles the mind.  The Verizon store on L Street downtown Washington, D.C. cannot access my Verizon account.  They can only sell cellphones then it's up to me to contact Verizon on my own to get the hook up. I even asked "Are you Verizon employes?  Is this a vendor store or is it really a Verizon owned and operated store?"  The answer "Yes, we are Verizon employes, yes this is a Verizon owned and operated store" ...
    Yes, it indeed boggles the mind.  I'm of course referring to the fact that your post concerns Verizon Wireless products and services.  This forum is dedicated exclusively to Verizon Communications services.   As you probably know, Verizon Wireless and Verizon Communications operate as separate companies.
    If you need help for a Verizon wireless product or service, it's best to direct questions to the Verizon Wireless forums.  You can reach them by clicking on "Wireless" (either here or at the top of the page).
    Good luck and I sincerely hope you get your issue resolved.

  • How to uncheck "install new versions automatically" from INTERNET EXPLORER 11 from SCCM 2012

    We have deployed "Internet Explorer 11" application  through SCCM 2012 console .the deployed application was customized using "Internet Explorer customization wizard 11" tool.
    issue:
    we are getting  "install new versions automatically" check box as checked
    when we see from help about  "about internet Explorer"
    seeking solution:
    how to uncheck "install new versions automatically" check box from SCCM 2012 console.
    please let me know if we have any solution for this instant
    thanks,
    Gc.Hanumareddy

    Hi,
    For option: "install new versions automatically", we can simply prevent it via GPO or registry (the registry entry can also be deployed via GPO)
    Computer Configuration - Administrative Templates - Windows Components - Internet Explorer - Install new versions of Internet Explorer automatically
    Or
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main]    
    "EnableAutoUpgrade"=dword:00000000
    Yolanda Zhu
    TechNet Community Support

  • Error when creating a Proxy Object from WSDL

    Hi,
    when creating a proxy object in abap based on the [WSDL|http://download.mapandguide.com/EN/dev/xserver/XLocate-1.6.0.3.wsdl] i get the error 'Incorrect value: Unknown Type Referencens0:ArrayOfString'.
    1- Is there a conflict with the type 'String' that's also a type in ABAP
    <complexType name="ArrayOfString">
      <sequence>
      <element name="String" type="xsd:string" minOccurs="0" maxOccurs="unbounded" nillable="true" />
      </sequence>
      </complexType>
    2- Is it a name space problem?
    xmlns:ns0="http://types.xlocate.xserver.ptvag.com"
    type="ns0:ArrayOfString"
    3- Something else?
    Please Help!
    Thank
    Fouad

    Hi Isaias,
    we are working with this versions:
    SAP_BASIS     700     0015     SAPKB70015     SAP Basiskomponente
    SAP_AP                     700     0013     SAPKNA7013     SAP Application Platform
    We are not working with developer studio, only with the regular tools of the abap development workbench Transaction SE80.
    Thanks,
    Fouad

  • Creating a Configuration Scenario from Process Component Interaction Model

    Dear All,
    I created a very simple SAP Pro Comp Interaction Model in ESR.
    It has two Process Components (PC1, PC2) with a Service Interface (SI1,SI2)
    and Operation (OP1,OP2) each.
    There is one message (MT1) flowing between these two Process Components.
    I have created and activated all ESR objects.
    Now I try to configure the same in ID.
    But I get an error in Model Configurator saying
    "Process component PC1 does not contain a reference to a process component from the Enterprise Services Repository"
    "Process component PC2 does not contain a reference to a process component from the Enterprise Services Repository"
    The first step of the Configurator ie. Select Model says "Not Configurable"
    What could the issue be? Has anyone configured a Pro Comp Interaction Model successfully?
    I am able to configure the SAP delivered Models perfectly well. Just an issue with custom models.
    Thanks and Regards,
    Ashwin

    Did you ever resolve this issue?  I am facing exactly the same issue and have the same question.

  • Is it possible to create a development object from the development tab?

    Hello All,
    One the central concepts of SAP Solution Manager is that you perform almost all activities starting in Solution Manager. As I understand, it is not possible to create a customer development such as a program from the development tab in SSM. You first have to logon to the 'satelite' development system and create the object. Then you can register this object at the development tab. 
    Is this correct?
    Thanks in advance.

    Hi,
    You are right, you have to create your objects in your satellite system (its obvious).
    This object can be against any servicedesk message or any requirement for a particular business process, thus keeping track of all the developments process wise, request wise.
    Hope this solves your problem.
    Feel free to revert back.
    --Ragu

  • HELP IN Creating customized Oracle Object from Java

    How can I create a customized oracle object that has these 3 fields with data persistance:
    NAME : VARCHAR2
    INSER_DATE : DATE
    OBJ:user-defined collection(oracle.sql.array)
    using JAVA. Later, that oracle object is enqueue in Oracle avanced Queue.
    I've been looking in this site for the answer but had no luck.
    I am using Java 1.2 and Oracle 8.1.6.
    Any help will be appreciated as I needed so badly. Thanks.
    Robby
    [email protected]

    Hi
    I assume your attempting to generate a Java class with the approriate getters and setters. If so the JPulisher utility is what your after. You can access it from either JDeveloper or the command line... Its documented in the Oracle Java manuals (jdbc etc.)...
    A piece of advice... especially if you using AQ and ADT's or oracle's jms implementation against AQ, make sure you use the Oracle 8.1.7 jdbc drivers, even if your accessing an 8.1.6 DBMS. The performance difference is significant
    Dom

  • Is it possible to create a file object from a resource?

    Hi all
    Is it possible to create a File from a resource call rather than from a path
    e.g.
    File myFile= new File("C:/j2sdk/sampledir/mypage.htm");is how im doing it now
    how can i call it from a resource something like
    File myFile= new File(this.getClass.getResource("mypage.htm"));

    you may be right
    im trying to load a file into a string then display that string
    my resource thingy isnt working anyway :s
    [code[
    URI pTURI=null;
    URI pBURI=null;
    try
    pTURI= new URI(this.getClass().getResource("/resources/prev_header.htm").toString());
    pBURI= new URI(this.getClass().getResource("/resources/prev_fullpac.htm").toString());
    catch(URISyntaxException e)
    warnUser("URI Error");
    File previewTop = new File(pTURI);
    File previewBtm = new File(pBURI);
    im getting this error
    java.lang.NullPointerException
    at cssCreator.cssCreator.setPreview(cssCreator.java:1263)
    at cssCreator.cssCreator.<init>(cssCreator.java:48)
    at cssCreator.cssCreator.main(cssCreator.java:1681)

  • Create a File object from a file in a .jar

    i looked for 2 hours...
    i tired this:
    URL url =  MyClass.class.getResource("filename.dat");
    File file = new File(url.getFile());i give up.

    The problem is that the file inside a Jar file is not
    a file. The jar file just contains a stream of bytes
    in the format needed to make the Jar file. Jar files
    are not folders like in the directory. So to get at
    the contents of the Jar file you need to read the Jar.
    The getResource method returns the URL which is a
    file URL, but this only works because Java has
    handlers that deal with getting the contents from a
    Jar file based on this type of URL. A URL cannot
    just be made into a file. I'm not sure that the File
    object can handle this type of file URL (I guess not
    or we wouldn't be having this discussion). So really
    it just depends what you want do. If you want to
    extract the file, just read the data in from the
    inputstream gotten from the URL, or better just call
    getResourceAsStream(), and read the bytes into an
    array. After this, you can do whatever, write it as
    a file to the hard drive, convert to a string, get
    the size based on the array length. makes sense, but how could i get an InputStream into an array, dont i need the size of the array first? and i dont think i can use InputStream.available()to figure it out... i tired downcasting to a FileInputStream yet no avail.

  • Running Reset Internet Explorer Settings from a remote machine for a user.

    Before I tell them it can't be done, I figured I would check with the experts here!  Here is my scenario.
    1) no GPO access
    2) All 60,000 workstations are windows xp :(
    3) They want a powershell script to reset all the internet ie settings back to default
    4)  It would need to be a silent install with no prompting on the client machine
    5) They will not enable winrm on the workstation so I can not utilize invoke
    I have tried to utilize psexec within the powershell script and the neither the
    MicrosoftFixit50195.msi nor the RunDll32.exe InetCpl.cpl,ResetIEtoDefaults work.
    I have also ran process monitor on one of the machines while the above patches are being applied.  There is no way to change the values of all 5400 reg keys that the patch overwrites. :(
    If I could narrow down the amount of keys to a sane amount, I know I have used the format below sucessfully.
    & c:\TEMP\paexec.exe \\$machine -d -e -h -lo c:\TEMP\psexec.log -u $user -p $password cmd /c reg add "HKU\$sid\software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD  /d "1" /f

    Have you tried running the executables by setting the RunOnce key?
    http://msdn.microsoft.com/en-us/library/aa376977(v=vs.85).aspx
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • How to create a Image object from action script

    I need to set the back ground of charting dynamically, thus I need to create Image from a png/gif files. I have wrritten following code, but doesn't work.
    public function addBackground():void
        var cbg:ChartBackground=new ChartBackground();
        var bgs:Array=new Array();
        bgs.push(cbg);
        lineChart.backgroundElements=bgs;     
    package arubaUI
        import mx.controls.Image;
        [Embed(source="../assets/chart_16.png")]   
        public class ChartBackground extends Image
    Does any one knows how to do that?
    Thanks!

    I put the code like and got compile error:
    public class ArubaLinePanel extends Panel
      private var lineChart:LineChart;
      private var lineData:ArrayCollection=new ArrayCollection( [
                { Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450 },
                { Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
                { Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300 },
                { Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 },
                { Month: "May", Profit: 2400, Expenses: 575, Amount: 500 } ]);
      public function ArubaLinePanel()
            super();           
            lineChart=new LineChart();
            lineChart.dataProvider=lineData;
            lineChart.showDataTips=true;
            var axisX:CategoryAxis=new CategoryAxis()
            axisX.categoryField="Month";
            lineChart.horizontalAxis=axisX;
            var seriesArray:Array = new Array();
            var ls:LineSeries=new LineSeries();
            ls.yField="Profit";
            ls.displayName="Profit";
            seriesArray.push(ls);
            lineChart.series=seriesArray;
            this.addChild(lineChart);
            var legend:Legend=new Legend();
            legend.dataProvider=lineChart;
            this.addChild(legend);       
            addBackground();
    public function addBackground():void
        var cbg:ChartBackground=new ChartBackground();
        var bgs:Array=new Array();
        bgs.push(cbg);
        lineChart.backgroundElements=bgs;     
    Another method I tried:
    package arubaUI
        import mx.controls.Image;
        [Embed(source="../assets/chart_16.png")]   
        public class ChartBackground extends Image
    There is no compile error, but image is not show on screen,
    Thanks!
    April

Maybe you are looking for