/
Get-ADUser -Filter 'Surname -eq "Rogers"'
https://www.ipswitch.com/blog/searching-active-directory-with-powershell
Get-ADUser -Filter 'Surname -eq "Rogers"' -properties state
https://devblogs.microsoft.com/scripting/search-active-directory-for-user-and-office-locations/
Dns class
to Get IPv4 Address Into a Variable in PowerShell([System.Net.DNS]::GetHostAddresses('CYBORG718W100N') | Where-Object {$_.AddressFamily -eq "InterNetwork"} | select-object IPAddressToString)[0].IPAddressToString
Note:
--AddressFamily
parameter is used to specify an array of IP address families.