I want to add a function that can retrieve the Site of a AD Computer. The Get-ADComputer cmdlet gets a computer or performs a search to retrieve multiple computers.This topic explains the AD DS replication and topology management cmdlets in more detail, and provides additional examples. The GetADComputer cmdlet retrieves the default set of computer object properties. Use the Properties parameter to retrieve more properties. There are a few ways to get the site a computer is a member of. In this article, we will look at how to implement dynamic groups in AD using a PowerShell script. Such a PowerShell script should run on a schedule. The GetADComputer cmdlet allows us to find computer objects in the Active Directory and extract information from them. The FindADSite PowerShell function below will return the AD Site and Subnet for a specified computer name or IP Address.