title: Disable multiple computer account from txt
body: <pre><code>$Computers = Get-Content c:\temp\computers.txt
  
  foreach ($Computer in $Computers) {
      $ADComputer = $null
      $ADComputer = Get-ADComputer $Computer -Properties Description
  
      if ($ADComputer) {
          Add-Content C:\temp\computers.log -Value "Found $Computer, disabling"
          Set-ADComputer $ADComputer -Description "Computer Disabled on $(Get-Date)" -Enabled $false
      } else {
          Add-Content C:\temp\computers.log -Value "$Computer not in Active Directory"
      }
  }
  </code></pre>
  
  <p>Can someone verify whether above code is correct?
  Above code suppose to:</p>
  
  <ul>
  <li>disable multiple computers, read from txt file.</li>
  <li>Edit description of the disabled computers.</li>
  <li>create log file for the result.</li>
  </ul>
  
  <p>Customer don't have any testing environment that we can test. So I just don't want to risk anything.</p>