question

SakthiJeganathan-0745 avatar image
0 Votes"
SakthiJeganathan-0745 asked SakthiJeganathan-0745 commented

Powershell in Automation account

I want to automate self signed certificate creation and convert to pfx file. Also read pfx file to check certificate expiry date and generate new certificate accordingly. Can i do this using powershell in automation account by using azure storage account blob folder to save certificate and read certificate. Please advise.

when i read certutil -dump with azure blob storage https:// path it throws error.

azure-automation
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

olufemiaMSFT avatar image
0 Votes"
olufemiaMSFT answered olufemiaMSFT rolled back

Hello @SakthiJeganathan-0745 thanks for the post. what exactly is the error thrown? Also can you confirm you already deployed the Cert Utility to your Azure Automation account?
Cheers.

94206-certutilpng.png



certutilpng.png (234.4 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the response. I didnt see any issue running certutil in automation. It works fine even without deploying in automation account manually. My concern is reading directly .pfx file saved in storage account. It throws below error. Please advise

certutil -p your-password -dump "https://stgsursak123.blob.core.windows.net/cert/c.pfx"

CertUtil: -dump command FAILED: 0x80070002 (WIN32: 2 ERROR_FILE_NOT_FOUND)

CertUtil: The system cannot find the file specified.

I dont have issue reading file stored in powershell temp storage from automation account. Though i have given anonymous access to read blob container files am not able to read through certutil. From browser am able to read the blob container file anonymously

0 Votes 0 ·