+ Post New Thread
Results 1 to 6 of 6
Enterprise Software Thread, Creating Exchange Mailbox for Linked A/cs in Technical; Hi there, I've been asked to create x20 ICTEXAM accounts that need MS Office access and an email address. I ...
  1. #1
    bodminman's Avatar
    Join Date
    Apr 2007
    Location
    Sunny Suffolk
    Posts
    1,153
    Thank Post
    724
    Thanked 224 Times in 116 Posts
    Rep Power
    85

    Creating Exchange Mailbox for Linked A/cs

    Hi there,
    I've been asked to create x20 ICTEXAM accounts that need MS Office access and an email address.

    I have created the accounts on the RM CC3 system and have also created the Linked A/c's on the Admin domain where Exchange 2010 lives.

    I have:
    created a AD group for the accounts and added the members
    created a Mailbox DB on Exchange mounted the DB
    Set some restrictions for the DB

    But when I try the following command to try and get Exchange creating mail a/cs for the linked users:
    $creds = get-credential (credentials of admin user in the pupil domain)

    $Users = get-user -Filter {(MemberOfGroup -eq 'cn=ICT Exam Grp1,OU=KHS Groups,DC=khs-admin,DC=internal')}
    (gets all disabled users in domain that need to be enabled)

    foreach ($User in $Users) {
    $userIdentity = $User.Identity
    $userUsername = 'DOMAIN_REMOVED\' + $User.SamAccountName
    $userRecpType = $User.RecipientType

    if ($userRecpType -eq "User") {
    Enable-Mailbox -Identity $userIdentity -Database 'KHS-EX-01\ICT Exam Mailbox Database' -LinkedMasterAccount
    $userUsername -LinkedDomainController 'KHS-SR-001' -LinkedCredential $creds
    }
    }


    I get the following error:

    [PS] C:\Windows\system32>$creds = get-credential (credentials of admin user in the pupil domain)
    The term 'credentials' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
    spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:69
    + $creds = get-credential (credentials <<<< of admin user in the pupil domain)
    + CategoryInfo : ObjectNotFound: (credentials:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    [PS] C:\Windows\system32>
    [PS] C:\Windows\system32>$Users = get-user -Filter {(MemberOfGroup -eq 'cn=ICT Exam Grp1,OU=KHS Groups,DC=khs-admin,DC=i
    nternal')}
    [PS] C:\Windows\system32> (gets all disabled users in domain that need to be enabled)
    The term 'gets' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelli
    ng of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:86
    + (gets <<<< all disabled users in dom
    ain that need to be enabled)
    + CategoryInfo : ObjectNotFound: (gets:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    [PS] C:\Windows\system32>
    [PS] C:\Windows\system32>foreach ($User in $Users) {
    >> $userIdentity = $User.Identity
    >> $userUsername = 'DOMAIN_REMOVED\' + $User.SamAccountName
    >> $userRecpType = $User.RecipientType
    >>
    >> if ($userRecpType -eq "User") {
    >> Enable-Mailbox -Identity $userIdentity -Database 'KHS-EX-01\ICT Exam Mailbox Database
    ' -LinkedMasterAccount
    >> $userUsername -LinkedDomainController 'KHS-SR-001' -L
    inkedCredential $creds
    >> }
    >> }


    Any ideas?
    Last edited by bodminman; 10th March 2011 at 09:40 AM.

  2. #2
    tarquel's Avatar
    Join Date
    Jun 2005
    Location
    Powys, Mid-Wales, UK
    Posts
    1,740
    Thank Post
    13
    Thanked 45 Times in 35 Posts
    Rep Power
    29
    er... I think theres something wrong with ur error message

  3. #3
    bodminman's Avatar
    Join Date
    Apr 2007
    Location
    Sunny Suffolk
    Posts
    1,153
    Thank Post
    724
    Thanked 224 Times in 116 Posts
    Rep Power
    85
    What do you mean?

  4. #4
    tarquel's Avatar
    Join Date
    Jun 2005
    Location
    Powys, Mid-Wales, UK
    Posts
    1,740
    Thank Post
    13
    Thanked 45 Times in 35 Posts
    Rep Power
    29
    hehe I mean you've got explainations in the script i.e.:

    $creds = get-credential (credentials of admin user in the pupil domain)
    and have following it given us the output of the script that still has those explainations in it:

    [PS] C:\Windows\system32>$creds = get-credential (credentials of admin user in the pupil domain)
    The term 'credentials' is not recognized as the name of a cmdlet, function, script file, or operable program.

  5. #5
    bodminman's Avatar
    Join Date
    Apr 2007
    Location
    Sunny Suffolk
    Posts
    1,153
    Thank Post
    724
    Thanked 224 Times in 116 Posts
    Rep Power
    85
    LOL - Cheers

    Removed the explanations but still have an error:

    You must provide a value expression on the right-hand side of the '-' operator.
    At line:7 char:80
    + $userUsername - <<<< LinkedDomainController 'KHS-SR-001' -LinkedCredential $creds
    + CategoryInfo : ParserError: ( : ) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : ExpectedValueExpression

  6. #6
    tarquel's Avatar
    Join Date
    Jun 2005
    Location
    Powys, Mid-Wales, UK
    Posts
    1,740
    Thank Post
    13
    Thanked 45 Times in 35 Posts
    Rep Power
    29
    Can you update your first post with what you have in the script now? and the resultant output too?

SHARE:
+ Post New Thread

Similar Threads

  1. reconnected mailbox , exchange 2007
    By imiddleton25 in forum Windows
    Replies: 0
    Last Post: 21st June 2010, 04:43 PM
  2. Exchange 2003 Blank mailbox store when creating new user
    By chrisjako in forum Office Software
    Replies: 0
    Last Post: 12th March 2010, 12:26 PM
  3. Deleted Exchange Mailbox User is still there - somewhere!
    By Number6 in forum Windows Server 2000/2003
    Replies: 0
    Last Post: 24th November 2009, 05:37 PM
  4. Exchange 2007 Mailbox
    By Edu-IT in forum Windows Server 2000/2003
    Replies: 4
    Last Post: 14th September 2009, 09:36 AM
  5. Exchange Mailbox Permissions
    By AnnDroyd in forum Windows
    Replies: 0
    Last Post: 18th October 2007, 08:29 AM

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
  •