In SharePoint 2010 the Web Object has different properties to get site groups and web groups.
$web = Get-SPWeb $webUrl
//Gets a collection that contains all the groups in the site collection.
$siteGroups = $web.SiteGroups
//Gets a collection that contains all the groups for the website. This return SPGroupCollection object and listed groups will be assigned security roles assigned in a current site
$webGroups = $web.Groups
//Gets a collection that contains all the groups for the website. This returns all web groups but some group may not have securoty roles assigned.
$webGroups = $web.AssociatedGroups
You can refer the web properties and methods here https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spweb_properties(v=office.14).aspx