Exporting Certificates

I’m looking for away to export all “LocalMachine” certificates to import on another machine. I’ve had a look at the export-Certificate cmdlet but struggling to see a way to capture all of them.

Please try below:

Get-ChildItem -Path Cert:\LocalMachine -Recurse | Where Thumbprint | ForEach-Object { Export-Certificate -FilePath "C:\TEMP\$($_.Thumbprint).cer" -Cert $_ }