sharepoint enterprise – Fetch active AD groups in site collection using PnP powershell for SP 2013

The requirement is to fetch all active AD groups in a site collection using pnp powerhsell in SP 2013. We have tried querying the User Info list and also web.siteusers but have noticed that this fetches all users and AD groups including historical ones which are now deleted. These are not needed.

Is there any other way to achieve this?