header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
SourceAdminCredential syntax with microsoft hosted exchange
Last Post 05 Aug 2010 11:06 AM by gilcs. 0 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
gilcsUser is Offline
New Member
New Member
Posts:1
Avatar

--
05 Aug 2010 11:06 AM
    Microsoft exchange online service has  set of scripting  power shell commands. I'm trying to automate the script for get-xhostedExchangeMailboxData (exporting mailbox data to local computer). Manually the script works OK: I get the user/password popup and the export works. I want to write a script this authentication to automate the process.
    I first created the encrypted credential object using: ps:$credential.Password | ConvertFrom-SecureString | Set-Content c:\temp\password.txt
    Then I tried to put the -SourceAdminCredential in the script, but surely did something wrong (it does not work...).
    What I wrote was:
    Get-XsHostedExchangeMailboxdata -sourceserver "red002.mail.emea.microsoftonline.com" -sourcelocation "https://red002.mail.emea.microsoftonline.com/exchange" -sourceidentity user@domain.emea.microsoftonline.com | export-transporterbinary -sourceadmincredential pscredential $password = get-content c:\temp\password.txt | convertto-securestring $credential = new-object "adminuser@domain.com",$password -targetfilepath e:\export -targetfileprefix "user"
    What I get in RED letters is:
    Export-TransporterBinary : A parameter cannot be found that matches parameter name 'sourceadmincredential'. At line:1 char:273

    + Get-XsHostedExchangeMailboxdata -sourceserver "red002.mail.emea.microsoftonline.com" -sourcelocation "https://red002.mail.emea.microsoftonline.com/exchange" -sourceidentity user@domain.emea.microsoftonline.com | export-transporterbinary -sourceadmincredential <<<< pscredential $password = get-content c:\temp\password.txt | convertto-securestring $credential = new-object "adminuser@domain.com",$password -targetfilepath e:\export -targetfileprefix "user"
    What is the right syntax to write it?

    Thanks a lot,
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer