Try this:
$OU = "DC=Domain,DC=com"
$dn = (Get-ADGroup "GroupName").distinguishedName
Get-ADUser -Filter * -SearchBase $OU -Properties Name,SamAccountName,LastLogonDate,DistinguishedName, memberOf |
Where-Object {($_.LastLogonDate -ge (Get-Date).AddDays(-60)) -and ($_.memberOf -notcontains $dn) } |
Select-Object Name,SamAccountName,LastLogonDate,DistinguishedName |
export-csv "C:\temp\userexport.csv" -NoTypeInformation
If you have more than one domain controller in the domain "domain.com" you're going to get results that aren't entirely accurate because your using LastLogonDate, and that's a locally (i.e. per DC) "calculated" value of the LastLogonTimeStamp. To be entirely accurate you'll have to query each DC for each user for the user's "LastLogon" value. You'll then keep just the most recent date from among them.
Here's a good reference (there are many more!): lastlogon-vs-lastlogontimestamp-vs.html