title: Powershell check types of int and double
body: <p>I need the user to fill in an integer, but with the code shown beneath, also doubles are allowed. How can I change it to allow only integers?</p>
  
  <pre><code>do{
  
      $opgegevenGetal = read-host "Enter an integer"
  
      if(![bool]($opgegevenGetal -as [int])){
          write-host "Only integers please"
      }
  
  }
  
  until ([bool]($opgegevenGetal -as [int]))
  </code></pre>