You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varfailureMessage=$"Inventory job failed for Site '{jobConfiguration.CertificateStoreDetails.StorePath}' on server '{jobConfiguration.CertificateStoreDetails.ClientMachine}' with error: '{LogHandler.FlattenException(ex)}'";
110
+
varfailureMessage=$"Inventory job failed for Site '{jobConfiguration.CertificateStoreDetails.StorePath}' on server '{jobConfiguration.CertificateStoreDetails.ClientMachine}' with error: '{ex.Message}'";
_results=psHelper.ExecutePowerShell("New-KFIISSiteBinding",parameters);// returns true if successful
55
+
_logger.LogTrace("Returned from executing PS function (New-KFIISSiteBinding)");
56
+
57
+
if(_results!=null&&_results.Count>0)
60
58
{
61
-
_logger.LogTrace($"Bound certificate with the thumbprint: '{thumbprint}' to site: '{bindingInfo.SiteName}' successfully.");
62
-
return;
59
+
varbaseObject=_results[0]?.BaseObject;
60
+
if(baseObjectisboolvalue)
61
+
{
62
+
if(value)
63
+
{
64
+
_logger.LogTrace($"Bound certificate with the thumbprint: '{thumbprint}' to site: '{bindingInfo.SiteName}' successfully.");
65
+
}
66
+
else
67
+
{
68
+
_logger.LogTrace("Something happened and the binding failed.");
69
+
}
70
+
}
71
+
else
72
+
{
73
+
_logger.LogWarning("Unexpected result type returned from script: "+baseObject?.GetType().Name);
74
+
}
63
75
}
64
76
else
65
77
{
66
-
_logger.LogTrace("Something happened and the binding failed.");
78
+
_logger.LogWarning("PowerShell script returned no results.");
67
79
}
68
80
}
69
-
70
-
thrownewException($"An unknown error occurred while attempting to bind thumbprint: {thumbprint} to site: '{bindingInfo.SiteName}'. \nCheck the UO Logs for more information.");
81
+
catch(Exceptionex)
82
+
{
83
+
thrownewException($"An unknown error occurred while attempting to bind thumbprint: {thumbprint} to site: '{bindingInfo.SiteName}'. \n{ex.Message}");
0 commit comments