Trigging the Mail app with Powershell

Hi,

I have a Powershell script that I run at the start of day to trigger my most used applications.I’ve been using the following command:

start “shell:AppsFolder$(Get-StartApps “Your Phone” | select -ExpandProperty AppId)”

Which launches the “Your Phone” app without issue. I have tried to do the same with the Windows 10 email app:

start “shell:AppsFolder$(Get-StartApps “Mail” | select -ExpandProperty AppId)”

But I get an error

start : This command cannot be run due to the error: The system cannot find the file specified.

At line:1 char:1

  • start "shell:AppsFolder$(Get-StartApps “Mail” | select -ExpandProper …

  • 
      + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException 
    
      + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
    
    

So then I tried:

start “shell:AppsFolder$(Get-StartApps “Mail and Calendar” | select -ExpandProperty AppId)”

No error, but it only opened the application folder.

I then used:

Get-AppxPackage -AllUsers | Select Name, PackageFullName

But this didn’t show a Mail app. I believe that the Mail app is part of “microsoft.windowscommunicationsapps” but running:

start “shell:AppsFolder$(Get-StartApps “microsoft.windowscommunicationsapps” | select -ExpandProperty AppId)”

Just opens the Application folder.

Any ideas what the correct command should be?

Thanks

Steve