sidnuts Posted April 15, 2011 Report Posted April 15, 2011 Can anyone help me with some powershell stuff. Basically, have set up the online mail server and imported users into it with a CSV file. I put a column in there called "CurrentAttribute1" which split the users into Staff/pupil/admin etc, and now I want to set up a group based on these attributes. Trouble is, it only lets me do it from powershell cmdlets. I can't even find the get cmdlet to return the full list of imported attributes, let alone start to build a group with them. Anyone got any ideas? Sorry if this is posted in the wrong forum, btw!
sukh Posted April 15, 2011 Report Posted April 15, 2011 Hi How did you import the users? Powershell? What group do you want to setup? DL? SG? and do you want to assign this group a custom attriubute? Sukh
sidnuts Posted April 15, 2011 Author Report Posted April 15, 2011 Imported them using the import function on the system portal. I assigned each user a custom attribute denoting staff/pupil/admin/etc, and want to set up a distribution list based on these attributes, so I really want a script which will assign all users to a certain DL based on this switch, so to speak. Does that make sense? Cheers for the quick response, btw!
sukh Posted April 15, 2011 Report Posted April 15, 2011 So how many distribution lists do you want to set-up? See below for powershell to create group New-DistributionGroup: Exchange 2007 Help Then set custom attribute on each group. Also see. Powershell « Live@edu Sukh
Arthur Posted April 15, 2011 Report Posted April 15, 2011 Either of these should do it... New-DynamicDistributionGroup -Name "All Staff" -IncludedRecipients MailboxUsers -ConditionalCustomAttribute1 Staff New-DynamicDistributionGroup -Name "All Staff" -RecipientFilter { (RecipientType -eq 'UserMailbox') -and (CustomAttribute1 -eq 'Staff') } e.g. $LiveCred = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection Import-PSSession $Session New-DynamicDistributionGroup -Name "All Staff" -RecipientFilter { (RecipientType -eq 'UserMailbox') -and (CustomAttribute1 -eq 'Staff') } Remove-PSSession $Session Links http://help.outlook.com/en-us/140/dd264649.aspx http://help.outlook.com/en-us/140/dd264647.aspx
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now