Reputation: 38228
In dos when I paste this command it works:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" https://google.com --screenshot=c:\test\google.png --headless --hide-scrollbars --window-size=1920,1080 --disable-gpu &
When I do the same in Powershell it doesn't. I guess my syntax not right ?
Upvotes: 2
Views: 2521
Reputation: 3046
You have to use Start-Process
in Powershell and parse the Arguments:
Start-Process -FilePath "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -ArgumentList "https://google.com","--screenshot=c:\test\google.png","--headless","--hide-scrollbars","--window-size=1920,1080","--disable-gpu"
Upvotes: 5