Skip to main content

Select-PDAccount

SYNOPSIS

Sets the default MSSP customer account for the current PowerDMARC session.

SYNTAX

Select-PDAccount [-AccountId] <Int32> [-SkipValidation] [-PassThru] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

DESCRIPTION

Updates the AccountId stored by Connect-PowerDMARC so that subsequent calls to Reseller-mode cmdlets (e.g. Get-PDDomain, Get-PDHostedSPF) that need an AccountId don't have to pass -AccountId every time. Only meaningful in Reseller mode.

By default the account is verified with a Get-PDAccount call before being selected, so a mistyped or inaccessible AccountId fails immediately rather than on the next unrelated call. Use -SkipValidation to select without that check.

EXAMPLES

EXAMPLE 1

Select-PDAccount -AccountId 42

EXAMPLE 2

Get-PDAccount | Where-Object name -eq 'Contoso' | Select-PDAccount

PARAMETERS

-AccountId

The MSSP account ID to make the default for this session. Accepts pipeline input, including directly from Get-PDAccount.

Type: Int32
Parameter Sets: (All)
Aliases: Id, account_id

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

-SkipValidation

Set the AccountId without first verifying it via the API.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-PassThru

Return the selected account object (or, with -SkipValidation, the AccountId) instead of producing no output.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
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

System.Int32

NOTES

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