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."

            if($bg) {
                     write-host "The $dp boundary group ID is: $bg" -ForegroundColor Green

                Write-Host "The $($dp) is Missing Boundary" -ForegroundColor Red



Show More

Related Articles

Back to top button