Rotate DKIM for multiple domains using PowerShell

Dennis Ratemo 41 Reputation points
2021-04-29T06:20:27.637+00:00

I would like to upgrade the DKIM keys to 2048-bit for about 120 domains using PowerShell. I have all the DKIM Guids in a csv. It will be tedious to work on each.

I have this command for individuals but I need to tweak it to do the same action for the imported csv file with all the 120 domains.

Rotate-DkimSigningConfig -KeySize 2048 -Identity {Guid of the existing Signing Config}

Any guidance is appreciated.

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,045 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andy David - MVP 138K Reputation points MVP
    2021-04-29T11:53:54.45+00:00

    Assume the column name is "Identity" in your csv

    Example:

    $DKIM = Import-csv DKIM.csv
    $DKIM |% {Rotate-DkimSigningConfig -KeySize 2048 -Identity $_.Identity}
    

0 additional answers

Sort by: Most helpful