chrisred / posh-scripts

11 stars 4 forks source link

Empty AD Attibutes? #5

Closed CDIFactor closed 4 years ago

CDIFactor commented 4 years ago

The Outlook Signature script works great so far.

My question is what if an attribute is not populated in AD, but is included in the .docx template?

For example, not everyone has a mobile number defined or a fax OR they don't want those numbers published in their email signature. Can I have something like M: {mobile} in the template, but if the attribute is blank, that item is omitted from the signature?

chrisred commented 4 years ago

I added an option to do this in v1.3, thanks for the suggestion.

https://github.com/chrisred/posh-scripts/blob/master/OutlookSignatureScript.ps1