Advertisement
Eliel_Sec

PowerShell_Modelo para alterar Winrm - parametros

Sep 14th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ##modelo para alterar as configurações do Winrm
  2.  
  3. winrm get winrm/config/winrs
  4.  
  5. #retorno do comando acima
  6. Winrs
  7.     AllowRemoteShellAccess = true
  8.     IdleTimeout = 7200000
  9.     MaxConcurrentUsers = 20
  10.     MaxShellRunTime = 2147483647
  11.     MaxProcessesPerShell = 25
  12.     MaxMemoryPerShellMB = 1024
  13.     MaxShellsPerUser = 20
  14.  
  15.  
  16. ##comando para alterar os parametros
  17.  
  18. winrm set winrm/config '@{MaxTimeoutms="120000"}'
  19. winrm set winrm/config/client '@{NetworkDelayms="15000"}'
  20. winrm set winrm/config/service '@{MaxConnections="300"}'
  21. winrm set winrm/config/winrs '@{MaxConcurrentUsers="40"}'
  22. winrm set winrm/config/winrs '@{MaxShellsPerUser="40"}'
  23. winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="540"}'
  24. winrm set winrm/config/winrs '@{MaxProcessesPerShell="40"}'
  25.  
  26.  
  27. ##apos executar novamente para confirmar alteração
  28. winrm get winrm/config
  29.  
  30. Config
  31.     MaxEnvelopeSizekb = 500
  32.     MaxTimeoutms = 120000
  33.     MaxBatchItems = 32000
  34.     MaxProviderRequests = 4294967295
  35.     Client
  36.         NetworkDelayms = 5000
  37.         URLPrefix = wsman
  38.         AllowUnencrypted = false
  39.         Auth
  40.             Basic = true
  41.             Digest = true
  42.             Kerberos = true
  43.             Negotiate = true
  44.             Certificate = true
  45.             CredSSP = false
  46.         DefaultPorts
  47.             HTTP = 5985
  48.             HTTPS = 5986
  49.         TrustedHosts = *
  50.     Service
  51.         RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
  52.         MaxConcurrentOperations = 4294967295
  53.         MaxConcurrentOperationsPerUser = 1500
  54.         EnumerationTimeoutms = 240000
  55.         MaxConnections = 300
  56.         MaxPacketRetrievalTimeSeconds = 120
  57.         AllowUnencrypted = false
  58.         Auth
  59.             Basic = false
  60.             Kerberos = true
  61.             Negotiate = true
  62.             Certificate = false
  63.             CredSSP = false
  64.             CbtHardeningLevel = Relaxed
  65.         DefaultPorts
  66.             HTTP = 5985
  67.             HTTPS = 5986
  68.         IPv4Filter = *
  69.         IPv6Filter = *
  70.         EnableCompatibilityHttpListener = false
  71.         EnableCompatibilityHttpsListener = false
  72.         CertificateThumbprint
  73.         AllowRemoteAccess = true
  74.     Winrs
  75.         AllowRemoteShellAccess = true
  76.         IdleTimeout = 7200000
  77.         MaxConcurrentUsers = 40
  78.         MaxShellRunTime = 2147483647
  79.         MaxProcessesPerShell = 40
  80.         MaxMemoryPerShellMB = 540
  81.         MaxShellsPerUser = 40
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement