Determine Windows Assets Domains

Is there any way we can check if assets are joined to a domain or not? If assets are joined to a domain how can we proceed on creating dynamic assets based on domain name?