Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Using PowerShell
>
General PowerShell
SourceAdminCredential syntax with microsoft hosted exchange
Last Post 05 Aug 2010 11:06 AM by
gilcs
. 0 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
gilcs
New Member
Posts:1
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-xhostedExchangeMailbox
Data (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-XsHostedExchangeMailbo
xdata -sourceserver "red002.mail.emea.microsof
tonline.co
m" -sourcelocation "https://red002.mail.emea.
microsofto
nline.com/
exchange" -sourceidentity user@domain.emea.microsoft
online.com
| export-transporterbinary -sourceadmincredential pscredential $password = get-content c:\temp\password.txt | convertto-securestring $credential = new-object "adminuser@domain.com",$pa
ssword -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-XsHostedExchangeMailbo
xdata -sourceserver "red002.mail.emea.microsof
tonline.co
m" -sourcelocation "https://red002.mail.emea.
microsofto
nline.com/
exchange" -sourceidentity user@domain.emea.microsoft
online.com
| export-transporterbinary -sourceadmincredential <<<< pscredential $password = get-content c:\temp\password.txt | convertto-securestring $credential = new-object "adminuser@domain.com",$pa
ssword -targetfilepath e:\export -targetfileprefix "user"
What is the right syntax to write it?
Thanks a lot,
You are not authorized to post a reply.
Using PowerShell
--General PowerShell
--Books, Tools, and Videos
--Exchange Server
--Active Directory
--System Center Family
--Non-Microsoft Products
--SharePoint
--SQL Server
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
Using PowerShell
>
General PowerShell
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2