PowerShell Script to Create a Contact Card and Enable Email Forwarding

Exchange 2010
Can anyone help with creating a powershell script to create a contact card and set email forwarding at the sametime?
I'm looking to import a list of 200 users via a text or csv file, create the contact card with first name, middle initial if one exists, last name, (no alias) and put the contact card in the following OU "DIS###" in the a.b.c.com domain as well
as enable forwarding to @mail.com.
I've been able to create a script to enable mail forwarding but it doesn't help me without a contact card.  I hate to put this upon anyone, but my ps scripting and Exchange knowledge is still in it's infant stage and I need get this done post haste

Q:Import csv: Does this contain 200 mailboxes name
A:It contains 200 user logon names.
For the mail forwarding:
I currently have a csv file with two columns -- one named displayname and the next call mailaddress.  Under the displayname column I have the users account name (first.mi.last -- middle initial if they have one) and under mailaddress i have @mail.com.                                                                                                           
script:                                                                                                                                                                    
Import-CSV C:\setmailforwarding\mailforwarding.csv | foreach-Object{Get-Mailbox $_.displayname | set-Mailbox -forwardingAddress $_.mailaddress}
The above script should work if the contact card has been created.  Obviously I need to create the card first.
I don't have a script to set up the contact card as of yet -- I was hoping to get some help on that.
Q:E-mail forwarding: Is this  from  mailboxes to mail contact, you will be creating
A:Not really sure what you are asking.  I'm looking to create the contact card with a csv or txt file for first name, middle initial if one exists, last name, (no alias) and put the contact card in the following OU "DIS###" in the a.b.c.com domain as
well as enable forwarding to @mail.com.  The users current email is @mail.1234.com and we will be migrating our mailboxes to another organization that uses @mail.com.  I will need to set forwarding in the interim until the migration is complete.
Hope this helps.

Similar Messages

  • How to create a job card and how to add waranty card in sales order

    I have one scenario for CS.the scenario is realted to automotive industry. Basically its a trading industry of HCV,MCV,LCV apart from that they will do servicing also. First the customer comes for a service.he is having free services. he will have waranty for spare parts of the vehicle. once he comes for servicing first the executive will take complains from the customer after that a Job card will be issued to the customer. there his chasis no ,engine no and registration no will be there. once enter the chasis no entire customer details has to come. how many free services he is having for how many kilo meters.then job card will go to the spare parts dept.that dept will issue the spare parts.then they will invoice the customer. he will pay the payment.and finally the gate pass will be given to the customer to deliver the vehicle.
    painful area is how to create a job card and how to add waranty in sales order.
    Regards,
    Venkat

    Hi,
    Have u resolved it then Please let me know !!! It is a very interesting problem and owuld like to know the solution...
    Regards
    Krishna

  • The updated iPhoto program is cumbersome.  I am trying to create a Christmas card and can't figure out how to get the fold of the card on the left and not on the top of the card.  I had no trouble with this for the past two years.  Can someone help?

    The updated iPhoto program is cumbersome.  I am trying to create a Christmas card and can't figure out how to get the fold of the card on the left and not on the top of the card.  I had no trouble with this for the past two years.  Can someone help?

    Click on the Layout button lower right and choose a Vertical lyout from the dropdown

  • Powershell Script to create "custom" Document Library

    I have a powershell script which creates a Document Library for every user in AD.
    This works, but rather than using the default Document Library I want it use a custom Document Library.  However this isnt working.
    My script to create the default Document Library is this...
    [System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
    $site = new-object Microsoft.SharePoint.SPSite("http://servername/sitename");
    $siteweb = $site.OpenWeb();
    $webs = $siteweb.Webs;
    $strFilter = "(&(objectCategory=User)(name=accountname))"
    $objDomain = New-Object System.DirectoryServices.DirectoryEntry
    $objSearcher = New-Object System.DirectoryServices.DirectorySearcher
    $objSearcher.SearchRoot = $objDomain
    $objSearcher.PageSize = 1000
    $objSearcher.Filter = $strFilter
    $objSearcher.SearchScope = "Subtree"
    $colProplist = "samaccountname"
    foreach ($i in $colPropList){$objSearcher.PropertiesToLoad.Add($i)}
    $colResults = $objSearcher.FindAll()
    foreach ($objResult in $colResults)
    $objItem = $objResult.Properties; $objItem.samaccountname
    $listTemplate = [Microsoft.SharePoint.SPListTemplateType]::DocumentLibrary
    $listId = $siteweb.Lists.Add($objItem.samaccountname, "", $listtemplate);
    $list = $siteweb.Lists.GetList($listId, $true);
    $roleDef = $siteweb.RoleDefinitions.GetByType("Contributor");
    $user = "domain\" + $objItem.samaccountname;
    $rolAssign = new-object Microsoft.SharePoint.SPRoleAssignment($user, "email", "name", "notes");
    $rolAssign.RoleDefinitionBindings.Add($roleDef);
    if(!$list.HasUniqueRoleAssignments)
    {$list.BreakRoleInheritance($true);}
    for ($i = $list.roleAssignments.Count - 1; $i -gt -1; $i--)
    { $list.RoleAssignments.Remove($i) }
    $list.RoleAssignments.Add($rolAssign);
    $list.Update();
    Now I have a custom Document Library named "TESTLIB" so if I substitute the line:
    $listTemplate = [Microsoft.SharePoint.SPListTemplateType]::DocumentLibrary
    with
    $listTemplate = [Microsoft.SharePoint.SPListTemplateType]::TESTLIB
    Then it errors with this...
    How can I script powershell to create a "custom" Document Library?
    Thanks

    The below link should help you in creating custom document library using powershell
    http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/23/use-powershell-cmdlets-to-manage-sharepoint-document-libraries.aspx
    Vinod H
    Thanks for the link but I cant see anything to assist creating a custom library?  Was there something in paticular you saw?

  • Somehow a new contact became associated with my email.  Now all my email has her name on it. This happens only on my iMac, not on my other Apple devices.  I have removed my email from her contact card and deleted her from previous recipients on Mail.

    Somehow a new contact became associated with my email.  Now all my email has her name on it. This happens only on my iMac, not on my other Apple devices.  I have removed my email from her contact card and deleted her from previous recipients on Mail.

    Check the settings in the Accounts for Mail.
    Mail > Preferences > Accounts > Click on your email Account in the left column > What appears under Full Name in the right column?
    If that is the incorrect name you're describing change it to your correct name.

  • I want to customize the script that creates ID contact sheets

    I'm using Bridge and InDesign CS3. I just discovered the powerful tool of creating the contact sheets with Bridge. I was wondering if I could edit/customize the script that creates this function.
    I do not want a 1 pt border around my images or caption boxes. Does it use a JSX file and if so which one? I'm on a mac.

    I have added this script into Bridge following the path listed. When I generate an indesign Contact sheet I get an error??
    http://www.twistedjunkie.eclipse.co.uk/images/error.jpg
    not sure whats happening. I need to generate a contact sheet without reducing the image smaller than the A4 page, and without the keyline.
    could someone help
    lister

  • Powershell script to count number of list and library items in site collection

    We are identifying large lists in our 2010 SP environment and I'm attempting to write code to output the total number of list items in a site collection.   I'm using the code below but it only displays column data for title and url. 
    What do I need to add so it can count the number of items in each sharepoint list and library? 
    Get-SPSite -WebApplication http://sharepoint -Limit All |
       Select -ExpandProperty AllWebs |
       Select -ExpandProperty Lists |
       Select ParentWebUrl, Title
    I'm referencing
    http://sharepointpromag.com/sharepoint/windows-powershell-scripts-sharepoint-info-files-pagesweb-parts

    Please find belwo script, it will iterarte through all the folder/Subfoder to get the item counts from all list and library, you can modify this script to run this at site collection scope:
    Note: save the script in .ps1 file and execute the script as described below to get log file, it will save the log file out.txt in seleted directory:
    e.g.PS D:\PowershellScripts> .\ListItemCount.ps1 > out.txt
    $SPWebApp = Get-SPWebApplication "http://weburl.com/"
    foreach ($SPSite in $SPWebApp.Sites)
    if ($SPSite -ne $null)
    foreach ($SPWeb in $SPSite.AllWebs)
    foreach ($list in $SPWeb.Lists)
    $ListURL = $SPWeb.url + "/" + $list.RootFolder.Url
    Write-Output $ListURL
    [Microsoft.SharePoint.SPQuery]$query = New-Object Microsoft.SharePoint.SPQuery
    #$query.Folder = fldr;
    #Recursive Scope....
    $query.ViewAttributes = "Scope='Recursive'"
    $allitems = $list.GetItems($query);
    $filecount = $allitems.Count;
    Write-Output " No of item: " $filecount
    if ($SPWeb -ne $null)
    $SPWeb.Dispose()
    if ($SPSite -ne $null)
    $SPSite.Dispose()
    You can update the code to get any specific list type item count, using if($list.BaseType -eq "DocumentLibrary") condition:
    if($list.BaseType -eq "DocumentLibrary")
    $ListURL = $SPWeb.url + "/" + $list.RootFolder.Url
    Write-Output $ListURL
    [Microsoft.SharePoint.SPQuery]$query = New-Object Microsoft.SharePoint.SPQuery
    #$query.Folder = fldr;
    #Recursive Scope....
    $query.ViewAttributes = "Scope='Recursive'"
    $allitems = $list.GetItems($query);
    $filecount = $allitems.Count;
    Write-Output " No of item: " $filecount
    if ($SPWeb -ne $null)
    $SPWeb.Dispose()
    If my contribution helps you, please click Mark As Answer on that post and Vote as Helpful
    Thanks, ShankarSingh

  • On a MacBook Air is it possible to transfer the photos shown on Faces to my Contact cards and thus to my iPhone5?

    I'm new at this so please bear with me.  I had photos on each of my contacts at one time but have no idea how I got them there.  I would like to move the little square photos from Faces to my Contact cards but cannot seem to figure out how to do it.  There are icons for moving photos to almost anywhere but Contacts.  I always try dragging first because that was once the answer to every problem but so far it hasn't worked.  I also wanted to know if there is a setting to have the iPhone show the photo of the person calling so I know who it is without my readers on.  Yes, you got it..........I am aged and perhaps a little slow with this stuff but I'm still trying'!

    I am able to drag photos from iPhoto to Contacts on my MacBook Air. I resize the iPhoto window to make it smaller, open Contacts, select the Contact in question and click the Edit button at the lower right of the contact. I then drag the photo from iPhoto.
    The step that I'm guessing that you might be missing is clicking the Edit button at the lower right of the contact.

  • A script to create a new folder and place selected items into it?

    I'd like to select a few items and have either an Apple script / contextual menu automatically create a new folder and place the selected items inside it.
    I have many, many to do—which is why I wanted to know if there is a script or automator or contextual menu thing available. Or if not, how can I create one?
    Can that be done? Thank you!

    Thank you for your help. Now I just want to expand on this a bit. To use the Applescript you have supplied me, how do I tell it to name the folder other than by date, and where to put it?
    Let me say, preferably, is it possible to make an action like this right-clickable? Instead of having to pick a script. Anything that slows this process down means I might as well do it all by hand. What I'd really love to do is this:
    Select a number of items. Right click to an action saying "create a new folder and put this items in it. Name the folder with the first item's name". Very simple and quick.
    Could this be accomplished? Through Automator? or something that can appear in the contextual menu? Folder actions?
    I'm just getting started with using these tools.

  • Powershell script for creating SSL web application

    Hello,
    I am trying to create SSL web application in Sharepoint 2010 using power shell and I am using the below script.
    $WebApp = New-SPWebApplication -ErrorAction SilentlyContinue -Name $WebApplicationName -url $WebApplicationUrl -port $WebApplicationPort
    -ApplicationPool $AppPool.Name -ApplicationPoolAccount $AppPoolManagedAccount.Username -AuthenticationProvider $AuthProvider -DatabaseName
    $ContentDatabaseName
    -SecureSocketsLayer
    The web application gets created and when I try to create a site collection and access it, the page is inaccessible.
    So I tried to bind the url to a new certificate from inetmgr and site collection still doesnt show up.
    I tried manually through central admin and everything worked well including the binding to SSL.
    Is there anything wrong with script, if yes what more do I need to add into this?
    Thanks.

    The issue is solved, the problem was that the parameter -URL shouldn't be any random url but it should be
    https://yourservername/ and then configure the binding to a self-signed certificate.
    So John I think the command rather should be
    New-SPWebApplication -Name "Contoso Internet Site" -URL "https://yourservername"  -Port 80 -ApplicationPool "ContosoAppPool"                                                           
     than                                                                                                                                                         
    New-SPWebApplication -Name "Contoso Internet Site" -URL "https://www.contoso.com"  -Port 80 -ApplicationPool "ContosoAppPool"

  • Exchange 2003 - bulk create smtp contacts from user objects, bulk forward to smtp contacts, bulk turn off forwarding

    Exchange 2003 running on Windows server 2003.  ~50 Users all in same OU on same domain with primary email address [email protected]  objective is to create smtp contacts from each of the user objects imported back into the same domain in
    a different OU with mail, targetAddress, proxyAddresses/SMTP on the contacts being [email protected] and the options 'automatically update email addresses based on recipient policy' disabled and hidden from GAL for all.   At a later time will require
    a method to bulk forward all of the user objects to their corresponding  [email protected] contact object and a way to to bulk disable the forwarding at a later time.   
    ldifde created the contacts via export/import but Exchange seems to like rewriting the mail & proxyaddresses  or replacing domain2.com with one of the internal recipient policy domains requiring manual change in AD.
    ldifde -f export-01.ldf -s dc1.domain1.com -d "OU=Users,OU=people,DC=domain1,DC=com" -r "(&(objectCategory=person)(objectClass=user)(givenname=*))" -l "cn,givenName,objectclass,samAccountName,mail,physicalDeliveryOfficeName,displayName,name,description,sn,targetAddress"
    ldifde -i -f import-test-01.ldf -s dc1.domain1.com
    I'm then using ADModify.net to bulk modify hide from address lists attribute and correct the mail, targetaddress, proxyaddress attributes, possibly forwarding as well.  The process is clunky compared to something like powershell on Exchange 2010. 
    Am I going about this the wrong way?

    users will remain on the domain.  decommissioning or altering access to the old mailboxes until some point post-migration would be unwanted so there's a fallback method in case anything goes wrong.  until testing reveals a better method, the strategy
    for Exchange 2003 / Server 2003 environment will remain as is for now using ldifde export of select user object attributes followed by ldifde import of select attributes to contact objects, followed by admodify.net / admodcmd updating of the necessary mail/exchange
    attributes via %’mailNickName’% similar to what's described below to forward internal mail to the external host.
    Using ADModify to Change Exchange Specific AD User Attributes in Bulk
    Using ADModify – A real world example

  • How can I create a contact form for sending emails in SharePoint Online?

    Dear Forum members,
    I´ve got a question about creating a custom contact form to send emails for a public site in SharePoint online.
    Could someone help us with some advise?
    In advance, thank you very much.
    Kind regards,
    Frits

    You can create Custom list and make alerts enable to send emails as soon as contact created.
    Bala

  • Powershell script to get all user profiles with specific email address

    Hello,
    Please help me. I need a powershell script which can do the following things.
    List of all sharepoint user profiles with email address
    [email protected]
    List of all FBA user profiles with email address  [email protected]
         List of all Pending Access Requests
    Any help is much appreciated. Thanks.
    chirag

    The script is not working for me. I changed the url according to my site. See the below error
    New-Object : Exception calling ".ctor" with "1" argument(s):
    "UserProfileApplicationNotAvailableException_Logging ::
    UserProfileApplicationProxy.ApplicationProperties ProfilePropertyCache does
    not have 3f3a5705-0691-4fe8-8643-cccd65363dc9"
    At C:\Scripts\userprofileemails.ps1:11 char:19
    + $profileManager = New-Object
    Microsoft.Office.Server.UserProfiles.UserProfileMan ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~
        + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvoca
       tionException
        + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.Power
       Shell.Commands.NewObjectCommand
    You cannot call a method on a null-valued expression.
    At C:\Scripts\userprofileemails.ps1:12 char:1
    + $profiles = $profileManager.GetEnumerator()
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull
    Please guide me what to do on this.
    Thanks
    chirag

  • Portal 7.0 and CRM 5.0 Create a new Role and enabling Quick Create.

    Hi Experts,
    In our Portal Scenario, we need to create a new Role and to customize it with some iviews(CRM BSP iviews).
    The role was created and it works fine; in fact in the navigation it is possible to navigate in these BSP application:
    1)Account
    2)Products
    3)Activities
    My question is the following: I see that in the standard role <b>com.sap.pct.crm.salesmanager</b> (contained in the Business Package for my SAP CRM 5.0) it is possible to see in the portal desktop the functionality "Quick Create", how it is possible to enable the "Quick Create"??
    Kind Regards.
    Eugenio

    Hi Eugenio,
    Did you find how to do that? I am facing the same problem.
    Regards,
    Mauricio

  • Need a perl script which monitors a network folder and sends email when new files/folders arrived...

    I need a perl script (or something else better) which monitors a network folder and sends email when new files/folders arrived. I tried it in Automator but failed.
    Thanks!

    Yes. I tried it. But whenever I restart m Mac, the watch folder doesn't work until I reconnect to network or run the Automator... I need a simple system that automatically connects to the network and monitor the folder, even I restart the Mac.
    Thanks!

Maybe you are looking for

  • New X1 Carbon 2014 + Onelink Pro dock + 30inch monitor: no native resolution

    X1 Carbon 2014 model Onelink Pro dock Dell U3011 30 inch monitor (native resolution: 2560x1600), connected to displayport on Onelink pro dock Installed Ubuntu 14.04 (beta) Max resolution on U3011 I can get is 1920x1440 right now. Tried on Win 8.1 pro

  • Centering layout and Z-Indez

    I have been having a difficult time debugging why my layout will not center in the browser window. The CSS for body and wrapper are: body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; text-align: center; margin: 0px; padding:

  • Deleted Emails won't disappear!

    Approximately 60-70% of the time my deleted emails won't disappear from webmail.  I've tried Firefox and IE, spoken to several Verizon help techs to no avail.  My immediate neighbor has never had this issue.  It happens regardless of distance from ro

  • Permissions modification makes the finder crash

    My folders have user lists of "Me", "(unknown)", and "everyone", with the default permissions set to "Read & Write", "Read Only", and "No Access" respectively. When I click the little "+" button to apparently add another user to the list the finder r

  • [SOLVED: use wine] Steam + Nvidia 7300gt (304.64) "glGetError"

    Steam installed from aur and works perfectly. I bought CS:S, but cant run. Fatal Error: Could not find required OpenGL entry point 'glGetError' In terminal, when steam starting: libGL error: failed to load driver: swrast Assertion Failed: X context i