How to launch Microsoft Edge to a specific Workspace?

Paul Jefferies 30 Reputation points
2023-09-11T09:44:11.8766667+00:00

How can I launch Microsoft Edge directly to a specific shared Edge Workspace, ie what is the command line switch?

Preferably I would like to launch two workspaces at once; more preferably I would like to launch them on to the last desktop region that they were arranged on.

I use "{msedgelocation} --restore-last-session" currently but it does not restore Workspaces.

Thank you.

I had a go with "--window-workspace" (from this list of Edge command line switches) using the name of the Workspace and separately with an ID I found (from the share URL). I also tried launching the Workspace share URL in the normal way using Explorer, but that didn't work it just opens a blank browser.

FYI general information about Edge Workspaces.

Windows for business | Windows Server | User experience | PowerShell
Microsoft Edge | Microsoft Edge development

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

4 answers

Sort by: Most helpful
  1. ITAutom8 50 Reputation points
    2024-02-13T19:44:04.3466667+00:00

    I believe you can use: msedge.exe" --launch-workspace=$workspaceID The ID is located in the workspace cache file: $env:LOCALAPPDATA\Microsoft\Edge\User Data\Profile #\Workspaces\WorkspacesCache

    Was this answer helpful?

    10 people found this answer helpful.
  2. Brendan Carr 15 Reputation points
    2025-01-16T07:47:52.54+00:00

    I wanted a popup dialog box with a drop down to pick a workspace, so here you guys go!

    You will need to create a shortcut to run this, and it's a bit clunky because it has to hide the console/command prompt. I'm sure it can be improved upon. Here's the shortcut target, and make sure you set it to "run minimized" so you don't see the console/cmd popup.

    %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -NoProfile -file "c:\location\folder\script.ps1"

    # Define the path to the JSON file
    $jsonFilePath = "$($env:UserProfile)\AppData\Local\Microsoft\Edge\User Data\Default\Workspaces\WorkspacesCache"
    
    # Read and parse the JSON file
    $jsonContent = Get-Content -Path $jsonFilePath -Raw | ConvertFrom-Json
    # Import the assembly for Windows Forms
    Add-Type -AssemblyName System.Windows.Forms
    
    # Create a new form
    $form = New-Object System.Windows.Forms.Form
    $form.Text = 'Select a Workspace'
    $form.StartPosition = 'CenterScreen'
    $form.AutoSize = $true
    $form.FormBorderStyle = 'FixedDialog'
    $form.MinimizeBox = $false
    $form.MaximizeBox = $false
    $form.Height = 120
    
    # Create a ComboBox for workspace selection
    $comboBox = New-Object System.Windows.Forms.ComboBox
    $comboBox.DropDownStyle = 'DropDownList'
    $comboBox.Width = 250
    $comboBox.Location = New-Object System.Drawing.Point(10, 10)
    
    # Collate workspace names and IDs into the ComboBox
    foreach ($workspace in $jsonContent.workspaces) {
        $comboBox.Items.Add("$($workspace.name) [$($workspace.id)]")
    }
    
    # Add the ComboBox to the form
    $form.Controls.Add($comboBox)
    
    # Create an OK button
    $okButton = New-Object System.Windows.Forms.Button
    $okButton.Text = 'Open Workspace'
    $okButton.DialogResult = [System.Windows.Forms.DialogResult]::OK
    $okButton.Location = New-Object System.Drawing.Point(10, 45)
    $okButton.AutoSize = $true
    
    # Add the OK button to the form
    $form.Controls.Add($okButton)
    
    # Create a Cancel button
    $cancelButton = New-Object System.Windows.Forms.Button
    $cancelButton.Text = 'Cancel'
    $cancelButton.DialogResult = [System.Windows.Forms.DialogResult]::Cancel
    $cancelButton.Location = New-Object System.Drawing.Point(120, 45)
    $cancelButton.AutoSize = $true
    
    # Add the Cancel button to the form
    $form.Controls.Add($cancelButton)
    
    # Show the form and wait for the user to click OK or Cancel
    $result = $form.ShowDialog()
    
    if ($result -eq [System.Windows.Forms.DialogResult]::OK) {
        # Extract the selected workspace name and ID
        $selectedWorkspaceFullText = $comboBox.SelectedItem
        $selectedWorkspaceName = $selectedWorkspaceFullText -replace ' \[\S+\]', ''
        $selectedWorkspaceID = [regex]::Match($selectedWorkspaceFullText, '\[(\S+)\]').groups[1].value
    
        # Shell output of selection
        Write-Output "Selected Workspace Name: $selectedWorkspaceName"
        Write-Output "Selected Workspace ID: $selectedWorkspaceID"
    
        # Launch Microsoft Edge with the selected workspace
        Write-Host "Launching Microsoft Edge for workspace: $selectedWorkspaceName"
        Start-Process -FilePath "msedge.exe" -ArgumentList "--launch-workspace=$selectedWorkspaceID --no-startup-window"
        Write-Host "Workspace has been launched."
    }
    
    
    
    

    Was this answer helpful?

    3 people found this answer helpful.
  3. Gian 5 Reputation points
    2026-10-21T09:12:41.3633333+00:00

    Microsoft Edge 155.0.4283.62

    A) settings > Start, home, and new tab page > On startup = OPEN THE NEW TAB PAGE B)

    Find your msedge.exe path (find the icon of Edge in your desktop > right-click > properties > Target). In my case "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"

     

    C)

    Go to:

    edge://sync-internals

     

    Then:

    Sync Node Browser

     

    Use the search/filter and look for:

    Edge Workspace

     

    Search for the item with "title": equal to your Workspace of choice
    User's image

    You need that GUID "30XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXcb"

     

    D)

    In the Desktop create a shortcut (right-click > new > shortcut)

    Paste with your GUID: "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" **--launch-workspace="30XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXcb"
    ** If you want you can pin the shortcut in the TaskBar.

    Used GPT 5.6 Sol - Think Deeper in Copilot, but was hard to work with because this version of Edge does not cache localy for what I understand. Hope this helps.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Raina Zhao - MSFT 2,890 Reputation points Microsoft External Staff
    2023-09-12T06:19:35.75+00:00

    Hi @Paul Jefferies ,

    Currently, it is not supported to directly launch Edge Workspaces using command line. You need to open a workspace from Edge browser.

    This command start msedge --restore-last-session can launch all closed tabs last time.

    We recommend that you could submit a feature request to the Dev Team by sending feedback (Press Alt+Shift+I) in Microsoft Edge.

    Thanks for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards,

    Raina Zhao

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments