Skip to main content

Select-PDDomain

SYNOPSIS

Sets the default domain for the current PowerDMARC session.

SYNTAX

Select-PDDomain [-DomainId] <Int32> [-SkipValidation] [-PassThru] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

DESCRIPTION

Updates the DomainId stored by Connect-PowerDMARC so that subsequent calls to cmdlets that need a DomainId (currently Get-PDHostedSPF) don't have to pass -DomainId every time. Works in both Default and Reseller mode.

By default the domain is verified with a Get-PDDomain call before being selected (in Reseller mode this uses the already-selected AccountId, so select an account first there), so a mistyped or inaccessible DomainId fails immediately rather than on the next unrelated call. Use -SkipValidation to select without that check.

EXAMPLES

EXAMPLE 1

Select-PDDomain -DomainId 158463

EXAMPLE 2

Get-PDDomain | Where-Object domain -eq 'meiertobler.ch' | Select-PDDomain

PARAMETERS

-DomainId

The domain ID to make the default for this session. Accepts pipeline input, including directly from Get-PDDomain.

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

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

-SkipValidation

Set the DomainId 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 domain object (or, with -SkipValidation, the DomainId) 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/end-user/api-v-1-documentation

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