I have tried the following:
$edge = New-Object -com microsoft-edge.application
$edge.visible = $true
$edge.FullScreen = $true
But I get error:
New-Object : Retrieving the COM class factory for component with CLSID
{00000000-0000-0000-0000-000000000000} failed
due to the following error: 80040154 Class not registered (Exception from
HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
At line:1 char:9
+ $edge = New-Object -com microsoft-edge.application
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [New-Object], COMException
+ FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand
Am I doing something obviously wrong here?
Edit 17/07/2019 - I have changed to below:
$edge = Start-Process -FilePath ($Env:WinDir + "\explorer.exe")
-ArgumentList
"shell:Appsfolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge"
$edge.visible = $true
$edge.FullScreen = $true
So now Edge opens but the Visible and Fullscreen commands return errors - anyone have any ideas?
Cheers