Little language-aware PowerShell code snipped: How to add a management group to the local admins on servers or workstations, respectively.
$AdminGroupName = gwmi win32_group -filter "LocalAccount = $TRUE And SID = 'S-1-5-32-544'" | select -expand name
$OSName=(gwmi win32_operatingsystem).Name
if($OSName.contains('Server')){
Add-LocalGroupMember -Group $AdminGroupName -Member "SvrAdmins"
}else{
Add-LocalGroupMember -Group $AdminGroupName -Member "WksAdmins"
}