FeaturedPower ShellSCCMScripts
sccm client boundary group validation

Use this script to find remote machines sccm client has associate to any boundary group
$dpservers = Get-Content "C:\test\dpservers.txt"
foreach($dp in $dpservers) {
$bg = (Get-WmiObject -NameSpace Root\CCM\locationservices -ComputerName $dp -Class boundarygroupcache).BoundaryGroupIDs
If (!(Test-Connection -ComputerName $dp -Count 1 -Quiet)) {
Write-Host "$dp is not on network."
}else{
if($bg) {
write-host "The $dp boundary group ID is: $bg" -ForegroundColor Green
}else{
Write-Host "The $($dp) is Missing Boundary" -ForegroundColor Red
}
}
}


