title: SETSPN Error: Ldap Error(0x1 -- Operations Error): ldap_get_next_page_s
body: <p>I am getting an error and I don't understand why? I have googled and looked as much as I can and still do not have a clear answer. Here is what I am fast with.</p>
  
  <pre><code>Checking domain DC=corp,DC=local
  Ldap Error(0x1 -- Operations Error): ldap_get_next_page_s
  + CategoryInfo          : NotSpecified: (Ldap Error(0x1 ...get_next_page_s:String) [],     RemoteException
  + FullyQualifiedErrorId : NativeCommandError
  + PSComputerName        : computer01.corp.local
  
  Error occured when searching for existing SPN: 0x00000001
  Checking domain DC=corp,DC=local
  Ldap Error(0x1 -- Operations Error): ldap_get_next_page_s
  + CategoryInfo          : NotSpecified: (Ldap Error(0x1 ...get_next_page_s:String) [],     RemoteException
  + FullyQualifiedErrorId : NativeCommandError
  + PSComputerName        : computer01.corp.local
  
  Error occured when searching for existing SPN: 0x00000001
  </code></pre>
  
  <p>This is the command I am running</p>
  
  <pre><code>$comp = "computer01.corp.local"
  Invoke-Command -ComputerName $comp -ScriptBlock {
  
      Invoke-Expression "SETSPN -S MSSQLSvc/$comp:1433 CORP\user.name"
      Invoke-Expression "SETSPN -S MSSQLSvc/$comp CORP\user.name"
  }
  </code></pre>