Unfortunately, there is no in-built tool with Windows 10 that will allow you to change the resolution automatically.
I tried automating resolution using direct registry edits with PowerShell, but there are too many different possible keys responsible for it, depending on the type of graphics card you have.
If you can find the exact registry keys responsible for your resolution, you could use cmdlets such as Get-PSDrive -PSProvider Registry,New-ItemProperty,Get-Item,Get-ItemProperty,Set-ItemProperty,Remove-Item,Remove-ItemProperty to automate that.
To find the registry keys in question, there are a number of approaches. You could use Process Monitor to look at which registry keys and files are being updated when you make a resolution change.
Or you could regedit to export the registry before and after you make the change, and then compare the two files using a tool such as WinMerge