+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
Windows Thread, Exchange 2007 Mail Contacts in Technical; Good luck fawkers with the data collection excercise Trouble is .... you have to keep doing it! I think enabling ...
  1. #16

    Join Date
    Mar 2009
    Location
    Hants
    Posts
    54
    Thank Post
    5
    Thanked 5 Times in 3 Posts
    Rep Power
    11
    Good luck fawkers with the data collection excercise

    Trouble is .... you have to keep doing it! I think enabling parents to keep on top of it themselves (a la ParentMail) is the 'only' long term decent solution that isn't going to tie the admin team in knots every year.

  2. #17
    IGB
    IGB is offline

    Join Date
    Apr 2009
    Location
    South Glos
    Posts
    20
    Thank Post
    1
    Thanked 1 Time in 1 Post
    Rep Power
    0
    We're also using SLG2 as well, so the parents can check their contact details that are held in SIMS live on there. If there are any changes they can contact the school themselves. We also do an annual data collection anyway which includes email addresses, so it doesn't really add to much to the data collection process.

  3. #18
    fawkers's Avatar
    Join Date
    Jun 2007
    Location
    Southend
    Posts
    193
    Thank Post
    32
    Thanked 22 Times in 21 Posts
    Blog Entries
    2
    Rep Power
    31
    IGM - Doesn't SLG allow the parents to update there own details? We've just started look at SLG, what do you think of it over all?

  4. #19
    fawkers's Avatar
    Join Date
    Jun 2007
    Location
    Southend
    Posts
    193
    Thank Post
    32
    Thanked 22 Times in 21 Posts
    Blog Entries
    2
    Rep Power
    31
    Quickly back on topic i've just updated the script to allow poeple to opt-out of receving email, just put a list of e-mails in a text file and edit line 59 for the correct path.

    Code:
    Add-PSSnapin Microsoft.Exchange.Management.Powershell.Admin
    Add-pssnapin Quest.ActiveRoles.ADManagement
    
    Function decideEmail([string]$homeEmail,[string]$workEmail)
    {
        #Check for email, home email wins
        if($homeEmail -ne '')
        {
            return $homeEmail
        }#end if
        if($workEmail -ne '')
        {
            return $workEmail
        }#end if
        else{return $null}
    }#end function decideEmail
    
    
    
    function get-dn ([string]$SAMName,[string]$type)
    {
    	$root = [ADSI]''
    	$searcher = new-object System.DirectoryServices.DirectorySearcher($root)
    	    
        switch($type)
        {
            contact{
                $searcher.filter = "(&(objectClass=contact)(cn=$SAMName))"    
            }
            group{
                $searcher.filter = "(&(objectClass=group)(cn=$SAMName))"
            }
            user{
                $searcher.filter = "(&(objectClass=user)(sAMAccountName=$SAMName))"
            }
            computer{
                $searcher.filter = "(&(objectClass=computer)(name=$SAMName))"
            }
        }
    
    	$user = $searcher.findall() 
        
    	if ($user.count -gt 1){ 
    		$count = 0
    		foreach($i in $user){
    			write-host $count ": " $i.path 
    			$count = $count + 1
    		}
    		$selection = Read-Host "Please select item: "
    		return $user[$selection].path.toString()
    	}
    	else{
    		return $user[0].path
    	}
    }
    
    function CheckIfOptedOut([string] $fullname, [string] $email)
    {    
        $optoutlist = Get-Content \\shsg-d02-fnp01\staffuserdata$\ampickett\Documents\Powershell\exchange\OptOutList.txt
        
        if($optoutlist.Contains($email)){
            #check if already existing contact
            $check = get-dn $fullname contact
            if($check -eq $null)
            {          
                Disable-MailContact -Identity $fullname -Confirm:$false
            }#end if
            
            return $true
        }#end if
    
        return $false
    }#end fuction CheckifOptedOut
    
    function CheckandCreateGroup([string]$GroupName)
    {
        $check = get-dn $groupName group
        if($check -eq $null)
        {
            new-qadgroup -ParentContainer 'OU=Creation,DC=olympus,DC=local' -name $GroupName -samAccountName $GroupName -grouptype 'Distribution' -groupscope 'Universal'
            sleep 10
            enable-DistributionGroup -Identity (get-dn $GroupName group).substring(7) -Alias ($groupname.replace(" ","")) -DisplayName $GroupName
        }
    }#end fuction creategroups
    
    Function AssignSecurityGroups([string]$fullName,[string]$yearGroup,[string]$RegGroup)
    {  .
        CheckandCreateGroup("Parents")
        
        $yearGroup = "Parents "+$yearGroup
        CheckandCreateGroup($yearGroup)
        $RegGroup = "Parents "+$RegGroup
        CheckandCreateGroup($RegGroup)
        
        $ParentsGroupDN = get-dn "Parents" group
        $YeargroupDN = get-dn $yearGroup group
        $regGroupDN = get-dn $regGroup group
        
        $contactDN = get-dn $fullName contact
        
        add-QADGroupMember -identity $ParentsGroupDN.substring(7) -member $contactDN.substring(7)
        Add-QADGroupMember -identity $YearGroupDN.substring(7) -member $contactDN.substring(7)
        Add-QADGroupMember -identity $regGroupDN.substring(7) -member $contactDN.substring(7)
    }
    
    Function runImport([string]$filePath)
    {    
        #Import CSV and iterate though
        Import-CSV $filePath | foreach-object{
        
            #Create year and reg Group vars. Can only be done on first run
            if($_.Name -ne '')
            {
                $Script:reg = $_.reg
                $Script:year = $_.Year
            }                
            
            #Check that the contact has Parental Responsibility
            if($_.'Parental Responsibility' -eq 'T')
            {
                $email = decideEmail $_.'home email' $_.'work email';
                
                #If contact has an e-mail address create contact card
                if($email -ne $null)
                {   
                    #check if already existing contact
                    $check = get-dn $_.'full Name' contact
                    if($check -eq $null)
                    {          
                        New-MailContact -Name $_.'Full Name' -ExternalEmailAddress $email -DisplayName $_.'Full Name' -FirstName $_.forename -LastName $_.surname -OrganizationalUnit 'ou=Creation,dc=olympus,dc=local' -PrimarySmtpAddress $email       
                    }  
                    else
                    {
                        Set-MailContact -identity $_.'Full Name' -ExternalEmailAddress $email -DisplayName $_.'Full Name' -PrimarySmtpAddress $email
                    }         
                                                   
                    AssignSecurityGroups $_.'full Name' $Year $Reg;
                    
                    if($check -eq $null){sleep 10}
                    
                    Set-MailContact -Identity $_.'Full Name' -HiddenFromAddressListsEnabled:$True
                    
                    #Check if the e-mail address has been opted out, disables the exchange contact but keeps the AD contact
                    CheckIfOptedOut $_.'full Name' $email
                }
            } #end if       
        } #end for
    } #end function runImport
    
    #Run Import
    runImport 's:\temp\contacts.csv';

  5. #20
    IGB
    IGB is offline

    Join Date
    Apr 2009
    Location
    South Glos
    Posts
    20
    Thank Post
    1
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by fawkers View Post
    IGM - Doesn't SLG allow the parents to update there own details? We've just started look at SLG, what do you think of it over all?
    Appologies Fawkers, I hadn't seen this question of yours until now.

    It doesn't allow parents to update their own details, which I'm glad of to be fair otherwise there would be another layer of support required.

    As a product overall, I think it's not to bad and our County is adopting it at county level, however we'll still maintain our own as we'll have more control overall than those that will be tied into the county's solution. As far as I can see those that make the move into county level hosting will have to become part of a larger AD tree and will have limited access to the AD structure or they will have to maintain 2 different Active Directories, one that they have full control over for their own establishment and 1 that the County will give some control over to them. This results in duplicate credentials for all users in the school. SLA's are yet to have been sorted as far as I can see, however the upside to handing it over to county is that they can take care of the backups and security levels.

    As a product itself it's pretty good and will meet the requirements for reporting before the deadline.

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Exchange 2007 - Address book & contacts
    By p_baa in forum How do you do....it?
    Replies: 10
    Last Post: 28th September 2009, 02:46 PM
  2. Exchange 2007 - Block mail by group
    By mitchell1981 in forum Windows
    Replies: 6
    Last Post: 14th September 2009, 10:09 AM
  3. Mail talking to exchange 2007
    By HMCTech in forum Mac
    Replies: 2
    Last Post: 21st July 2009, 08:28 PM
  4. Import contacts into OWA 2007
    By blackcat in forum How do you do....it?
    Replies: 2
    Last Post: 14th July 2009, 02:33 PM
  5. Exchange mail contacts help.
    By boomam in forum Windows
    Replies: 1
    Last Post: 12th January 2009, 02:05 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •