private/Functions/Hanwha/Get-HanwhaNumberOfChannels.ps1

#$c.attribute.value
#/stw-cgi/attributes.cgi/attributes/System/Limit/MaxChannel

Function Get-HanwhaNumberOfChannels {
    [cmdletBinding(
        #DefaultParameterSetName='Preset',
        #SupportsShouldProcess = $true,
        ConfirmImpact='high'
        )]
    Param(
        [Parameter(
            Mandatory=$true
        )]
        [String]$IP,

        [Parameter(
            Mandatory=$true
        )]
        [pscredential]$Credential
    )
    
    #Thankfully this is easy
    $CamCmd = @{
        URI = "https://$IP/stw-cgi/attributes.cgi/attributes/System/Limit/MaxChannel"
        Credential = $Credential
    }
    return (Invoke-HanwhaCommand @CamCmd).attribute.value
}