How do you change the SPWebApplication Web Page Security Validation timeout via PowerShell. I want to set this upon creating a web application during the creation of a farm, but I'm happy running a follow up script after creating the farm too.
You get to this in the GUI via Central Admin>Application Management>(select an app)>General Settings>Web Page Security Validation>Security validation expires after: ...
I can see the timeout setting in PowerShell using the scripts below, but I cannot set it that way. formDigestSettings is read only. You can leave off the '.Minutes' on the last line for more information about it.
$site = get-spsite 'https://....' $webapp = $site.WebApplication $webapp.FormDigestSettings.Timeout.Minutes