< Back

Set-PAAccount

Sat Jan 18, 2020 7:33 pm

NAME Set-PAAccount



SYNOPSIS

Set the current ACME account and/or update account details.





SYNTAX

Set-PAAccount [[-ID] <String>] [[-Contact] <String[]>] [-Deactivate] [-Force] [-NoSwitch] [-WhatIf] [-Confirm]

[<CommonParameters>]



Set-PAAccount [[-ID] <String>] -KeyRollover [-KeyLength <String>] [-NoSwitch] [-WhatIf] [-Confirm]

[<CommonParameters>]





DESCRIPTION

This function allows you to switch between ACME accounts for a particular server. It also allows you to update the

contact information associated with an account, deactivate the account, or replace the account key with a new one.





PARAMETERS

-ID <String>

The account id value as returned by the ACME server. If not specified, the function will attempt to use the

currently active account.



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Contact <String[]>

One or more email addresses to associate with this account. These addresses will be used by the ACME server to

send certificate expiration notifications or other important account notices.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Deactivate [<SwitchParameter>]

If specified, a request will be sent to the associated ACME server to deactivate the account. Clients may wish

to do this if the account key is compromised or decommissioned.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Force [<SwitchParameter>]

If specified, confirmation prompts for account deactivation will be skipped.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-KeyRollover [<SwitchParameter>]

If specified, generate a new account key and replace the current one with it. Clients may choose to do this to

recover from a key compromise or proactively mitigate the impact of an unnoticed key compromise.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-KeyLength <String>

The type and size of private key to use. For RSA keys, specify a number between 2048-4096 (divisible by 128).

For ECC keys, specify either 'ec-256' or 'ec-384'. Defaults to 'ec-256'.



Required? false

Position? named

Default value ec-256

Accept pipeline input? false

Accept wildcard characters? false



-NoSwitch [<SwitchParameter>]

If specified, the currently active account will not change. Useful primarily for bulk updating contact

information across accounts. This switch is ignored if no ID is specified.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Set-PAAccount -ID 1234567



Switch to the specified account.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Set-PAAccount -Contact 'user1@example.com','user2@example.com'



Set new contacts for the current account.









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Set-PAAccount -ID 1234567 -Contact 'user1@example.com','user2@example.com'



Set new contacts for the specified account.









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Get-PAAccount -List | Set-PAAccount -Contact user1@example.com -NoSwitch



Set a new contact for all known accounts without switching from the current.









-------------------------- EXAMPLE 5 --------------------------



PS C:\\>Set-PAAccount -Deactivate



Deactivate the current account.









-------------------------- EXAMPLE 6 --------------------------



PS C:\\>Set-PAAccount -KeyRollover -KeyLength ec-384



Replace the current account key with a new ECC key using P-384 curve.











RELATED LINKS

Project: https://github.com/rmbolger/Posh-ACME

Get-PAAccount

New-PAAccount