Rick151
Rick151

Reputation: 11

Add multiple certificates in MDT task sequence

I am using a deployment task sequence to call a Powershell script to install multiple certificates, but it is not installing them.

The command I am using is the following:


Import-Certificate -FilePath "%DeploymentRoot\Scripts\certs\cert1.cer" -CertStoreLocation Cert:LocalMachine\My



Import-Certificate -FilePath "%DeploymentRoot\Scripts\certs\cert2.cer" -CertStoreLocation Cert:LocalMachine\My

I tested changing to the full path and installs on the server.

I am getting the following error when the PXE machine finishes installing: Unknown error (Error: 00002A95; Source: Unknown) Task Sequence Engine failed! Code: enExecutionFail Task sequence execution failed with error code 80004005 RegQueryValueExW is unsuccessful for Software\Microsoft\SMS\Task Sequence, SMSTSEndProgram GetTsRegValue0 is unsuccessful. Ox80070002 Error Task Sequence Manager failed to execute task sequence, Code Ox80004005

Upvotes: 1

Views: 53

Answers (1)

2red13
2red13

Reputation: 11227

Your issue likely stems from the %DeploymentRoot% variable not being correctly interpreted in the context of your deployment task sequence.

Verify the Value of %DeploymentRoot% Use the following snippet in your PowerShell script to see if the variable resolves correctly:

Write-Output "DeploymentRoot: $env:DeploymentRoot" If this does not output the expected path, %DeploymentRoot% is not being set as expected.

Or replace %DeploymentRoot% with the actual full path of the deployment share in your script.

Upvotes: 0

Related Questions