new-mailbox and the -linkedcredential Parameter
Greetings: I've been trying to create linked mailboxes using Powershell. I've got Exchange 2007 Beta 2 deployed in a 2nd forest, with a one-way forest trust to another forest I'm using as the account source. The command I'm using is a follows: New-Mailbox -Name:'Test User' -Alias:'Test.User' -OrganizationalUnit:'domain.tld/Placeholder Accounts' -Database:'CN=Mailbox Database,CN=First Storage Group,CN=InformationStore,CN=DFE2K7MB,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=org_name,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=tld' -UserPrincipalName:'test.user@domain.tld' -SamAccountName:'test.user' -FirstName:'Test' -Initials:'' -LastName:'User' -LinkedMasterAccount:'Test User' -LinkedDomainController:'DC1.accountdomain.tld' -LinkedCredential:'accountdomain\adminaccount' It doesn't like whatever I provide it for the LinkedCredential parameter, though; I get the following returned: New-Mailbox : Cannot bind parameter 'LinkedCredential'. Cannot convert value "accountdomain\adminaccount" to type "System.Management.Automation.MshCredential". Error:"Invalid cast from 'System.String' to 'System.Management.Automation.MshCredential'." I gather from this that I can't provide the credentials as a string, but I have no idea where to go from here. Can anyone help me out? Just how do you use the LinkedCredentials parameter? Thanks, Andy Schan Titus International, Inc.
September 21st, 2006 1:32am

Linked credential doesn't take a a "domain\username". It takes a Credential object. Do something like this: $a=Get-Credential... -LinkedCredential $a This is because it needs to have a domain\username *and* password for accessing the user forest, not just a domain\username.
Free Windows Admin Tool Kit Click here and download it now
September 26th, 2006 5:11pm

OK, thanks. I'll give that a try when I get back to the office. Andy
September 26th, 2006 5:53pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics