You cannot security-enable or disable DGs. You can however convert an existing DG to a M365 group as follows:
New-UnifiedGroup -DlIdentity "DGName" –ConvertClosedDlToPrivateGroup:$true -DeleteDlAfterMigration
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How to convert mail enabled security group to Distribution list or M365 group in Exchange online?
Is there a way to do this as I checked but did not find any such option.
You cannot security-enable or disable DGs. You can however convert an existing DG to a M365 group as follows:
New-UnifiedGroup -DlIdentity "DGName" –ConvertClosedDlToPrivateGroup:$true -DeleteDlAfterMigration