I'm trying to find a nice "clean" way of displaying the template name used in the creation of a certificate in PowerShell. That information is currently in an OID, which makes the output a bit frustrating for me. Quick example below:
So this gives me an "almost there" output string of this: "Template=Lab Web Server(long OID in here)". I'd like the output of the string to be simply "Lab Web Server". no a better way to clean this data up?
EDIT: I found a way to do it that feels a little messy:
Not sure if there's a cleaner way to handle this....