title: If AD Description has certain number add to a specified group
body: <p>I have a script I'm trying to expand on to create student accounts from a csv. Works great.</p>
  
  <p>What I'm looking for:</p>
  
  <ul>
  <li>If the <strong>description</strong> has the following number: 01, 02, 03, 04, 05, 06 add to. <strong>K-6 Students</strong> member group.</li>
  <li>If the <strong>description</strong> has the following numbers: 07, 08, 09, 10, 11, or 12 add to <strong>6-12 Students</strong> member group.</li>
  <li>In addition to the <strong>All-Students</strong> group listed below.</li>
  </ul>
  
  <p>Account example: <a href="https://imgur.com/a/h9UDFfJ" rel="nofollow noreferrer">https://imgur.com/a/h9UDFfJ</a></p>
  
  <p>Here is part of the script I'm using </p>
  
  <pre><code> New-ADUser -Name "$Displayname" -DisplayName "$Displayname" -SamAccountName $SAM -UserPrincipalName $UPN -GivenName "$UserFirstname" -Surname "$UserLastname" -Description "$Description" -AccountPassword (ConvertTo-SecureString $Password -AsPlainText -Force) -Path "$OU" -ChangePasswordAtLogon $false –PasswordNeverExpires $true -Enabled $true -server AD1.schoolname.k12.or.us -HomeDirectory $HomeDirectory -HomeDrive $HomeDrive 
  
      Add-ADGroupMember -identity All-Students -members $SAM -server AD1.schoolname.k12.or.us
  
      Write-Host "AD Account $Displayname created!"  
  
      add-content $SuccessLog  "User $Displayname created Sucessfully."
  
      Write-Host -ForegroundColor Green $Displayname
  </code></pre>