How do I launch a Chrome browser in a full screen window with a specific URL as the webpage to open using PowerShell?
start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --start-fullscreen ""The above command gives an error:
"Start-Process : A positional parameter cannot be found that accepts argument '"
I have tried with and without the quotations too.
start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" ""The above open the page but will not display it full screen
start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --start-fullscreenWill open the browser but just to the start page.
Any guidance is greatly appreciated! For some reason combining the full screen and the URL option are causing me fits. What am I doing wrong?
For further information, what I am trying to accomplish is this: Open a browser full screen to a specific page, check to see if a screen shot exists, remove it if it does, save a screen shot, close the browser.
So far everything works except for full screen.
31 Answer
Since you are running with PowerShell, "start" is an alias for the Start-Process command. With PowerShell Start-Process requires the -ArgumentList parameter to specify what values you are passing as arguments separately than the process which is [started] executed.
Basically, you just need to enclose the --start-fullscreen "" in single quotes and make it the value of the -ArgumentList parameter of PowerShell Start-Process
PowerShell
Start-Process -FilePath "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -ArgumentList '--start-fullscreen ""'Alias using shorter PowerShell
Start "C:\Program Files(x86)\Google\Chrome\Application\chrome.exe" '--start-fullscreen ""'Supporting Resources
Standard Aliases for Start-Process:
saps,start