Forum Discussion

shambari's avatar
shambari
Copper Contributor
May 03, 2024
Solved

Is there any way to open company portal automatically using powershell or any script

I want a script or a command line to open company portal automatically (i have already company portal installed on my device) so i need to open it using power shell or run a script when i call with with a specific api

  • Hi shambari! You can try using the commands below depending on what you want:

     

    # Will start the Company portal app
    start companyportal:

    # Will start the Company portal app and go to a specific application, just switch out the X-X-X-X to an Applicationid in your tenant
    start companyportal:Applicationid=<X-X-X-X>

5 Replies

  • Hi shambari! You can try using the commands below depending on what you want:

     

    # Will start the Company portal app
    start companyportal:

    # Will start the Company portal app and go to a specific application, just switch out the X-X-X-X to an Applicationid in your tenant
    start companyportal:Applicationid=<X-X-X-X>

    • shambari's avatar
      shambari
      Copper Contributor
      It's work thank you so mush tobiassandberg, please is there any way to install this specific application using start companyportal:Applicationid=<X-X-X-X> by adding something to this command line
      • tobiassandberg's avatar
        tobiassandberg
        Iron Contributor

        Thanks shambari! For automatically install, please see the following article: https://www.systanddeploy.com/2022/09/run-application-from-company-portal.html?m=0

        The command looks like this:

        start-process companyportal:ApplicationId=YourAppID
        sleep 10
        [void][System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms')
        [System.Windows.Forms.SendKeys]::SendWait("^{i}")

Resources