Thursday, March 18, 2021

Powershell script to generate certificate for ADC for 5 years

  • Open powershell as administrator
  • Run 

 $fqdn = [System.Net.Dns]::GetHostByName(($env:computerName))

New-SelfSignedCertificate -DnsName $fqdn.HostName -CertStoreLocation “cert:\LocalMachine\My”  -NotAfter (Get-Date).AddYears(5)

 

  • Start>Manage Computer certificates
  • Check for your new certificate in your Personal>Certificate Folder
  • copy it to the Trusted Root Certification>Certificates folder
  • Right Click>Export>No private key>Der Encoded Binary
    • Install the exported certificate on all devices that need access
  • Right click on certificate>Details>Copy thumbprint with no spaces
  • In the NAV Server Instance>Edit>Paste the thumbprint into the thumbprint field>Save>Restart
Install this certificate on all mobile devices that will connect to BC in the Trusted Root Authority folder 

No comments:

Post a Comment