public/Get-IntakeYears.ps1

Function Get-IntakeYears {

    <#
    .SYNOPSIS
        A Quick function that shows what year group matches to what intake year
      
      
    .NOTES
        Name: Get-IntakeYears
        Author: Elliott Marter
      
      
    .EXAMPLE
        Get-IntakeYears
      
      
    .LINK
        https://www.powershellgallery.com/profiles/elliottmarter
    #>


    $Year = (get-date -UFormat %Y) -as [int]

    if ((get-date -UFormat %m) -ge "09") {
        $Year = ($Year + 1)
    }
        
    Write-Host "Year R:" ($Year - 1)
    Write-Host "Year 1:" ($Year - 2)
    Write-Host "Year 2:" ($Year - 3)
    Write-Host "Year 3:" ($Year - 4)
    Write-Host "Year 4:" ($Year - 5)
    Write-Host "Year 5:" ($Year - 6)
    Write-Host "Year 6:" ($Year - 7)

}