Rotate DKIM for multiple domains using PowerShell

Dennis Ratemo 41 Reputation points

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

    Assume the column name is "Identity" in your csv


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

0 additional answers

Sort by: Most helpful