mirror of
https://github.com/Set-OutlookSignatures/Set-OutlookSignatures.git
synced 2026-04-26 10:45:52 +03:00
[GH-ISSUE #45] Adding option for users to not have Photo in signature #13
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Set-OutlookSignatures-Set-OutlookSignatures#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dakolta on GitHub (Jul 29, 2022).
Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/45
Although all users have photos in AzureAD we have a few that do not want to have their photo in the signature.
I tried adding a code to a extensionattribute and used the following in the custom replacement file:
But it seems to have no effect, the photo is still being loaded.
script-output.txt
@GruberMarkus commented on GitHub (Jul 29, 2022):
I will not add a general option to Set-OutlookSignatures for this because of the incredible amount of possible trigger conditions.
You will have to create a custom configuration file. You can find instructions and recommendations for this directly in '.\config\default replacement variables.ps1'.
You are on the right track with your PowerShell code, it just contains a few errors. The following code is working:
Extension attribute 4 is queried with case insensitivity - if you want case sensitivity, change "-eq" to "-ceq".
Extension attribute must only contain the string 'np', no other characters - if you another comparison method, use '-like', '.contains' et al.
With the sample code above, your users wish to not use their photo in a signature is respected in any possible use case.
Please let me know if this solves your problem and this issue can be closed.
@dakolta commented on GitHub (Jul 29, 2022):
I'm sorry I did not for you to add an option for that purpose, I meant I was trying to add that option.
Your example works, I changed it to be .contains('np') because they also wanted to allow for users to include their mobile phone and I wanted to use the same extensionattribute for that and any other options they wanted.
I did not realize that I had to do both
CURRENTUSERPHOTOandCURRENTUSERPHOTODELETEEMPTY, otherwise it still inserts the picture.Thank you
@GruberMarkus commented on GitHub (Jul 29, 2022):
You do not need to set both the PHOTO and PHOTODELETEEMPTY variables, it depends which variable you use in your signature template. The README file describes the difference between the variables:
Closing issue, as it is solved successfully.