Jump to content

Recommended Posts

Posted

Here's one driving me nuts.

 

Using Exchange 365 with RM Unify. I currently have a dynamic distribution group setup for staff (user type is "Teaching Staff" and "Non-Teachjng Staff". All works properly, contains all staff.

 

When Unify syncs the student accounts, it basically sets their account type as "students" - which I suppose you'd expect... I can create a group which contains all, bingo.

 

I want to create dynamic distribution groups for each year group. Usernames contain the year they started.

 

[email protected]

[email protected]

jbloggs12....

 

I am trying to use PowerShell to create groups such as "[email protected]" where they all have "14" in their email address, "[email protected]" where they all have "13" in their email address etc...

 

If I run:

 

new-DynamicDistributionGroup "year7students" -recipientfilter {EmailAddresses -like "smtp:*[email protected]"} - I end up with no members.

 

If I run:

 

new-DynamicDistributionGroup "year7students" -recipientfilter {EmailAddresses -like "*[email protected]"} - I get the error stating a wildcard can't be used as the first character. It doesn't matter if use "-like" or "-eq".

 

I even tried:

 

new-DynamicDistributionGroup "year7stuents" -recipientfilter {EmailAddresses -like "j*[email protected]"} - All uses starting with j, then ending 14 (jbloggs14), but still no members.

 

If any powershell guru has any advice, it would be greatly appreciated.

 

Cheers,

Paul.

Posted
What happens if you run this...

 

New-DynamicDistributionGroup -Name "year7students" -RecipientFilter { EmailAddresses -like [color="#FF0000"]'[/color]*[email protected][color="#FF0000"]'[/color] }

 

 

Hi Arthur, thanks for the advice.

 

I have just tried and PowerShell gives me the following error:

 

"Wildcards cannot be used as the first character. Please revise the filter criteria."

 

Thanks,

Paul.

Posted

How are you adding your users into Active Directory?

One solution may be to right the Intake Year '2014' etc. to another attribute in AD for the user and use that to identify them that way.

Posted

Hi.

 

The problem with RM Unify, is it takes all students and dumps them in one place irrespective on which OU they are in the AD. The only attributes the client uses, username, password, first name, surname.

 

I know users can be added to a group manually, however this would be 'too much' for the people managing emails (not us in tech support)

 

I'll take another look tomorrow.

 

Cheers.

  • 1 month later...
Posted (edited)

Sorry for the long delay getting back. I haven't been in work for some time.

 

I have installed DiRSYNC onto a server - however the install fails, then won't let you remove it, plus says it is already installed once you try again.

 

As I say, RM Unify takes the users based on their primary group ("RM Students", "RM Non-Teaching Staff", RM Teaching Staff", "RM Administrator"). It totally doesn't take into account which OU they are in.

 

I'm still struggling to find a query that will check for the number on the end. I just wish you could have a wildcard at the beginning of the string (*14). I'm going to try "a*14", "b*14" so will see how I get on.

 

Paul.

Edited by RowlandoGloom
Posted (edited)

New-DynamicDistributionGroup -Name "___year7students" -RecipientFilter { EmailAddresses -like 'a*14@' }

 

Creates the group, nothing in it.

 

The only reason for the underscores is so it appears at the top of the list and makes it easier to find in the GUI for now.

 

Paul.

Edited by RowlandoGloom

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...