Public/Curanet/DNS/Get-CuraDNSRecords.ps1

function Get-CuraDNSRecords {
    <#
        .SYNOPSIS
            Command to fetch all DNS records for a given domain.
         
        .PARAMETER DomainName
            String containing domainname
 
        .OUTPUTS
            Object containing DNS records OR error
         
        .EXAMPLE
            $domain = "example.com"
            Get-CuraDNSRecords -Domain $domain
 
            This example fetches the DNS records for "example.com".
 
        .EXAMPLE
            Get-CuraDNSRecords -Domain "test.com"
 
            This example fetches the DNS records for "test.com".
    #>


    param (
        [Parameter(Mandatory=$true)]
        [string]
        $DomainName
    )

    return Invoke-CuraDNSRequest -Uri "Domains/$($DomainName)/Records" -Method "GET"
}