title: WinRM cannot process the request - Controlled by policy server
body: <p>I have a script to enable basic auth for the ansible control node to connect to windows host. Below is the script, when I execute the script I get an error msg <code>The config setting Basic cannot be changed because is controlled by policies.</code></p>
  <pre><code>Set-Service WinRM -StartMode Automatic
  Set-Item -Force WSMan:\localhost\Service\Auth\Basic $True
  winrm set winrm/config/service/auth '@{Basic=&quot;true&quot;}'
  winrm set winrm/config/service '@{AllowUnencrypted=&quot;true&quot;}'
  </code></pre>
  <p>When I execute the script I get the below error msg</p>
  <pre><code>Set-Item : The config setting Basic cannot be changed because is controlled by policies. The policy would need to be
  set to &quot;Not Configured&quot; in order to change the config setting.
  At C:\Users\krishna_venkata\Desktop\test.ps1:2 char:1
  + Set-Item -Force WSMan:\localhost\Service\Auth\Basic $True
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : NotSpecified: (:) [Set-Item], InvalidOperationException
      + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.SetItemCommand
  
  WSManFault
      Message
          ProviderFault
              WSManFault
                  Message = The config setting Basic cannot be changed because is controlled by policies. The policy would need to be set to &quot;Not Configured&quot; in order to change the config setting.
  
  Error number:  -2144108406 0x8033808A
  Cannot change GPO controlled setting.
  WSManFault
      Message
          ProviderFault
              WSManFault
                  Message = The config setting AllowUnencrypted cannot be changed because is controlled by policies. The policy would need to be set to &quot;Not Configured&quot; in order to change the config setting.
  
  Error number:  -2144108406 0x8033808A
  Cannot change GPO controlled setting.
  </code></pre>
  <p>This is the current winrm config</p>
  <pre><code>Service
      RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
      MaxConcurrentOperations = 4294967295
      MaxConcurrentOperationsPerUser = 1500
      EnumerationTimeoutms = 240000
      MaxConnections = 300
      MaxPacketRetrievalTimeSeconds = 120
      AllowUnencrypted = false [Source=&quot;GPO&quot;]
      Auth
          Basic = false [Source=&quot;GPO&quot;]
          Kerberos = true
          Negotiate = true
          Certificate = false
          CredSSP = false
          CbtHardeningLevel = Relaxed
      DefaultPorts
          HTTP = 5985
          HTTPS = 5986
      IPv4Filter = *
      IPv6Filter = *
      EnableCompatibilityHttpListener = false
      EnableCompatibilityHttpsListener = false
      CertificateThumbprint
      AllowRemoteAccess = true
  </code></pre>