\n“Now how to make the list into a suitable OPath filter?”<\/p>\n<\/blockquote>\n<\/aside>\n
I don’t believe you can, which is why I posted<\/p>\n
“I think you might have to bite the bullet and use a custom attribute or other field to identify your contractors.”<\/em><\/p>\nThe whole point with Dynamic Distribution Groups is that they are rules-based rather than data-based.<\/p>\n
If you run a script to pick up all recipients with “(Contract)” in their title (which you can do with Get-Recipient) and pipe that through to update a custom attribute or maybe the Department field or Office field, then your DDG can use that field as a filter field.<\/p>\n
You’d have to remember to update that field for any new contractors you created or, alternatively, run the script as a scheduled task periodically (once per night?)<\/p>","upvoteCount":1,"datePublished":"2021-07-01T02:36:10.000Z","url":"https://community.spiceworks.com/t/unable-to-use-wildcard-in-my-script/804074/20","author":{"@type":"Person","name":"dastafford","url":"https://community.spiceworks.com/u/dastafford"}}]}}