Good morning I have been struggling with a certificate request script. The requesting server is in the dmz and I have a management server internally. I successfully create the Inf file, as well as the req file then copy the req file to my internal management server. Once copied internal I attempt to run the following command from my laptop executing as my admin account
$Fqdn = "server.dmz.com"
$managementServer = "InternalServer"
$Path = "C$\Test\CertRequests"
Invoke-Command -ComputerName $Managementserver -ScriptBlock {param($CertificateAuthority,$FQDN,$Managementserver,$Path) certreq.exe -submit -attrib "CertificateTemplate:DVNOfflineComputer" -config "$CertificateAuthority" "\\$Managementserver\$Path\$FQDN.req" "\\$Managementserver\$Path\$FQDN.crt"} -ArgumentList $CertificateAuthority,$FQDN,$Managementserver,$Path
This exact command pasted into a powershell window locally on the management server returns the crt file. Run via invoke-command just hangs forever. I even tried to the Silent=True in inf file as well as certreq -submit -q but neither worked. Any help understanding why locally runs successful and remote stalls is greatly appreciated. Thank you