Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. appcmd set config /section:asp /maxRequestEntityAllowed: int
  2.  
  3. [string]$Account = $cred.UserName
  4. [string]$AccountPW = $cred.Password | ConvertFrom-SecureString
  5.  
  6. If(!(Get-Module WebAdministation))
  7. {
  8. import-module WebAdministration
  9. }
  10.  
  11. $iisAppPoolPath = "IIS:AppPoolsTEST"
  12.  
  13. $oappPool = New-Item $iisAppPoolPath
  14. $oappPool | Set-ItemProperty -name "enable32BitAppOnWin64" -Value "true"
  15. $oappPool | Set-ItemProperty -Name "managedRuntimeVersion" -Value "v4.0"
  16. $oappPool | Set-ItemProperty -Name "managedPipelineMode" -Value "Classic"
  17. $oappPool | Set-ItemProperty -name "processModel" -value @{userName=$Account;password=$AccountPW;identitytype=3}
  18.  
  19. Get-Item 'IIS:SitesDefault Web Site'
  20.  
  21. Set-WebConfigurationProperty /system.webserver/asp/limits -name maxRequestEntityAllowed -value "10485760"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement