I was able to do it like this running the print groups command to get the CSV then these as three ps1 files
$list = Import-Csv groups.csv
foreach ($entry in $list)
{
.\gam.exe update group $($entry.GroupID) settings who_can_post_message anyone_can_post
}
----------
$list = Import-Csv groups.csv
foreach ($entry in $list)
{
.\gam.exe update group $($entry.GroupID) settings who_can_view_membership all_in_domain_can_view
}
-----------------------
$list = Import-Csv groups.csv
foreach ($entry in $list)
{
.\gam.exe update group $($entry.GroupID) settings show_in_group_directory true
}