Maintain control of your Microsoft 365 data
Post Reply
matteu
Veeam Legend
Posts: 725
Liked: 118 times
Joined: May 11, 2018 8:42 am
Contact:

create self signed certificate

Post by matteu »

Hello,

I'm trying to perform standard post task installation veeam O365 with powershell and I don't know how to do to add an organisation. I see the commandlet in my case will be
New-VBOOffice365ApplicationOnlyConnectionSettings
However this cmdlet suppose I have the pfx. When I use the GUI, I can generate it as self signed and with veeam software as provider. Is there a way to do the same with powershell ?

Thanks
Mildur
Product Manager
Posts: 8735
Liked: 2294 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: create self signed certificate

Post by Mildur »

Hi Matteu

Have you tried general powershell commands?

Code: Select all

$cert = New-SelfSignedCertificate -subject "CN = Veeam Software,O = Veeam Software,OU = Veeam Software"  -NotAfter (Get-Date).AddYears(10) -FriendlyName "Veeam Software Group GmbH certificate"
$pw = ConvertTo-SecureString "Password" -AsPlainText -Force
Export-PfxCertificate -Cert $cert -FilePath C:\Temp\cert.pfx -Password $pw
Product Management Analyst @ Veeam Software
matteu
Veeam Legend
Posts: 725
Liked: 118 times
Joined: May 11, 2018 8:42 am
Contact:

Re: create self signed certificate

Post by matteu »

Hello,

Thanks for your answer :)

If it's working too, it's ok for me to use it ! I thought about it but not sure it could work correctly too ! In VBR there is a specific command to generate them ^^.

I can see the certificate generated with your command line has only "client and server authentication roles" but when Veeam generate it it's "All roles".

Can you confirm me if I use windows powershell to generate self signed certificate it's working on the same way than Veeam does ?
matteu
Veeam Legend
Posts: 725
Liked: 118 times
Joined: May 11, 2018 8:42 am
Contact:

Re: create self signed certificate

Post by matteu »

OK, after 2 hours I finally find how to do :) with your command :
We need to use keyeportpolicy if we want the private key exportable (as Veeam does) and Type custom for all roles.
Now I can generate all the certificates needed for each usage (add organization with modern authentication / rest api / restore operator authentication / restore portal / azure ad app restore portal)

Code: Select all

$cert = New-SelfSignedCertificate -KeyExportPolicy Exportable -Type Custom -subject "CN = Veeam Software,O = Veeam Software,OU = Veeam Software" -KeyUsageProperty All -NotAfter (Get-Date).AddYears(10) -FriendlyName "Veeam Software Group GmbH certificate"
$pw = ConvertTo-SecureString "Password" -AsPlainText -Force
Export-PfxCertificate -Cert $cert -FilePath C:\Temp\cert.pfx -Password $pw
Mildur
Product Manager
Posts: 8735
Liked: 2294 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: create self signed certificate

Post by Mildur »

Thx for the update :)
Product Management Analyst @ Veeam Software
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests