I'm trying to find a way to enable modern audience targeting on the Site Pages library of a Communication site with PowerShell.
Activating the hidden feature does not have any effect. Is this possible?
I'm not sure it can be done via PowerShell, however it can be achieved via the EnableModernAudienceTargeting method in the PnP Framework (heavily reliant on CSOM). You can find the underlying code for this in ListExtensions.cs
public static void EnableModernAudienceTargeting(this List list)