The following is an example PowerShell script that will help you get the "Everyone except external users" Principal through CSOM.
Photography and Code
The following is an example PowerShell script that will help you get the "Everyone except external users" Principal through CSOM.