Skip to main content

Get-PDAccount

SYNOPSIS

Retrieves PowerDMARC MSSP customer account(s).

SYNTAX

List (Default)

Get-PDAccount [-DateFrom <DateTime>] [-DateTo <DateTime>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

ById

Get-PDAccount [-AccountId] <Int32[]> [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Calls the PowerDMARC MSSP Account Management API (relative to the /mssp root stored by Connect-PowerDMARC -Mode Reseller):

  • `GET /accounts/{accountId}` for a specific account.
  • `GET /accounts?dateFrom=...&dateTo=...` to list customer accounts created within a date range. The API requires both dateFrom and dateTo on the list call; if omitted here, they default to the last 30 days.

Requires an active connection created with Connect-PowerDMARC -Mode Reseller. Accounts are a Reseller-only concept; this cmdlet is not available in Default mode.

EXAMPLES

EXAMPLE 1

Get-PDAccount
# Lists accounts from the last 30 days.

EXAMPLE 2

Get-PDAccount -DateFrom '2026-01-01' -DateTo '2026-12-31'

EXAMPLE 3

Get-PDAccount -AccountId 42

EXAMPLE 4

Get-PDAccount -DateFrom (Get-Date).AddMonths(-1) -DateTo (Get-Date) | Select-PDAccount

PARAMETERS

-AccountId

The MSSP account ID(s) to retrieve.

Type: Int32[]
Parameter Sets: ById
Aliases: Id

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DateFrom

Start of the date range to list accounts for. Defaults to 30 days ago.

Type: DateTime
Parameter Sets: List
Aliases:

Required: False
Position: Named
Default value: (Get-Date).AddDays(-30)
Accept pipeline input: False
Accept wildcard characters: False

-DateTo

End of the date range to list accounts for. Defaults to today.

Type: DateTime
Parameter Sets: List
Aliases:

Required: False
Position: Named
Default value: (Get-Date)
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

Fill ProgressAction Description

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.Management.Automation.PSObject

NOTES

https://api.powerdmarc.com/api/mssp/api-v-1-documentation