Melbourne, Australia
To be provided
Use Contact to message

SCCM Documentation – Summary of Distribution Points

Harmik Batth Tech's Blog

SCCM Documentation – Summary of Distribution Points

Next Step is to get Summary of Distribution points and some of there are important details.

Some of the important details when configuring Distribution points are:

  1. Branch Cache
    SCCM-Get-Summary-DistributionPoints-BranchCache
  2. PXE
    SCCM-Get-Summary-DistributionPoints-PXE
  3. Multicast
    SCCM-Get-Summary-DistributionPoints-Multicast
  4. Content Validation
    SCCM-Get-Summary-DistributionPoints-CotnentValidation
  5. Allow Failback Source

So When scripting this, First to get list of All distribution points and then gather hardware and some software configurations details

cls

$CMSites = Get-CMSite
$SMSProvider=’localhost’

ForEach($CMSite in $CMSites)
{
$SiteCode = $CMSite.SiteCode
$CMDistributionPoints = Get-CMDistributionPoint -SiteCode $CMSite.SiteCode

ForEach($CMDistributionPoint in $CMDistributionPoints)
{
$CMDPServerName = $CMDistributionPoint.NetworkOSPath.Split(‘\\’)[2]
Write-Output “$(Get-Date): Found DP: $($CMDPServerName)”
Write-Output “$($CMDPServerName)”
Write-Output “Trying to ping $($CMDPServerName)”
$PingResult = Test-NetConnection -ComputerName $CMDPServerName
If(-not ($PingResult.PingSucceeded))
{
Write-Output “The Distribution Point $($CMDPServerName) is not reachable. Check connectivity.”
}
Else
{
Write-Output ‘Disk information:’
$CMDPDrives = (Get-WmiObject -Class SMS_DistributionPointDriveInfo -Namespace root\sms\site_$SiteCode -ComputerName $SMSProvider) | Where({$PSItem.NALPath -like “*$CMDPServerName*”})

ForEach($CMDPDrive in $CMDPDrives)
{
Write-Output “Partition $($CMDPDrive.Drive):”
$Size = ”
$Size = $CMDPDrive.BytesTotal / 1024 / 1024
$Freesize = ”
$Freesize = $CMDPDrive.BytesFree / 1024 / 1024

Write-Output “$([MATH]::Round($Size,2)) GB Size in total”
Write-Output “$([MATH]::Round($Freesize,2)) GB Free Space”
Write-Output “Still $($CMDPDrive.PercentFree) percent free.”
Write-Output ”
}

Write-Output ‘Hardware Info:’
try
{
$Capacity = 0
Get-WmiObject -Class win32_physicalmemory -ComputerName $CMDPServerName | `
ForEach-Object {[int64]$Capacity = $Capacity + [int64]$_.Capacity}
$TotalMemory = $Capacity / 1024 / 1024 / 1024
Write-Output “This server has a total of $($TotalMemory) GB RAM.”
}
catch
{
Write-Output “Failed to access server $CMDPServerName.”
}
}
$DPInfo = $CMDistributionPoint.Props
$IsPXE = ($DPInfo.Where({$_.PropertyName -eq ‘IsPXE’})).Value
$UnknownMachines = ($DPInfo.Where({$_.PropertyName -eq ‘SupportUnknownMachines’})).Value
Switch ($IsPXE)
{
1
{
Write-Output ‘PXE Enabled’
Switch ($UnknownMachines)
{
1 { Write-Output ‘Supports unknown machines: true’ }
0 { Write-Output ‘Supports unknown machines: false’ }
}
}
0
{
Write-Output ‘PXE disabled’
}
}

$DPGroupMembers = $Null
$DPGroupIDs = $Null
$DPGroupMembers = (Get-WmiObject -class SMS_DPGroupMembers `
-Namespace root\sms\site_$SiteCode `
-ComputerName $SMSProvider) | Where({$_.DPNALPath -ilike “*$($CMDPServerName)*”});
If(-not [string]::IsNullOrEmpty($DPGroupMembers))
{
$DPGroupIDs = $DPGroupMembers.GroupID
}

#enumerating DP Group Membership
If(-not [string]::IsNullOrEmpty($DPGroupIDs))
{
Write-Output ‘This Distribution Point is a member of the following DP Groups:’
ForEach($DPGroupID in $DPGroupIDs)
{
$DPGroupName = (Get-CMDistributionPointGroup -Id “$($DPGroupID)”).Name
Write-Output “$($DPGroupName)”
}
}
Else
{
Write-Output ‘This Distribution Point is not a member of any DP Group.’
}
}
}

So this should get all the desired results

SCCM-Get-Summary-DistributionPoints-Output.png

 

 

No Comments

Add your comment