SharePoint offers a large variety of webservices and consuming such a webservice with PowerShell takes only a few lines of code:
$SPService = New-WebServiceProxy -Uri ($WebUrl + "/_vti_bin/SomeWebService.asmx?WDSL") -UseDefaultCredential $SPService.SomeMethod()
You can use PowerShell to enumerate all SharePoint groups and save them to a CSV-file without logging in to the SharePoint server.