Sharepoint - How to add AD Group to SharePoint Group using Powershell

$SiteCollection = "http://site/sitecollection"
$ADGroupName = "domain\adgroup"
$SPGroupName = "My Test Group A1"
$SPGroupDescription = "Test Group A1’s Description"
$SPGroupPermission = "Read"

#Start of script
$site = Get-SPWeb $SiteCollection

#Check if the group already exists
if ($site.SiteGroups[$SPGroupName] -eq $null)

#Ensure Group/User is part of site collection users beforehand and add them if needed

# Get the AD Group/User in a format that PowerShell can use otherwise there will be a string error
$ADGroupSPFriendly = $site | Get-SPUser $ADGroupName

#Create the SharePoint Group – Group Name, Group Owner, Group Member, Group Description. Can’t add AD group yet…
$NewSPGroup = $site.SiteGroups.Add($SPGroupName, $site.CurrentUser, $site.CurrentUser, $SPGroupDescription)
$NewSPAccount = $site.SiteGroups[$SPGroupName]

#Assign the Group permission
$GroupAssignment = New-Object Microsoft.SharePoint.SPRoleAssignment($NewSPAccount)
$GroupRole = $site.RoleDefinitions[$SPGroupPermission]

#Add the AD Group/User to the group, can’t be done during group creation when using Powershell otherwise errors so is done now.
Set-SPUser -Identity $ADGroupSPFriendly -Web $SiteCollection -Group $SPGroupName