I am using below command to enable audience targeting on site pages library in Modern communication site. It adds a column named Target Audiences of type Audience Targeting. But I am not sure if it enables audience targeting for library since column is not visible in page properties and I do not see toggle switched to enabled in library settings.
Hi, If you want to target the pages for specific users, please set the permissions for those users so that they won't be able to see or access the page from the pages library. Enabling the Target Audience is fine but to edit the properties of the page, you have to add the field to the default content type of the Pages library, these are not recommended.