Move-Mailbox with other user credentials

Hi All,

My helpdesk is going to run the move-mailbox powershell script I created. But they dont have right for using the command - and therefore im looking for a way to run the Move-Mailbox with another useraccount and password..

Anyway to include credentials on this command ?

Please help me with a solution.

Best Regards
Anders Jensen, Denmark
andersjensenAsked:
Who is Participating?
 
BSonPoshCommented:
There are two Credentials you can pass to move-mailbox

-TargetForestCredential <PSCredential>
    The TargetForestCredential parameter specifies the credentials that are
    used when connecting to the target data base.

-SourceForestCredential <PSCredential>
    The SourceForestCredential parameter specifies the credentials that are
    used when connecting to the source mailbox.

0
 
BSonPoshCommented:
More Info:
help Move-Mailbox -full
0
 
andersjensenAuthor Commented:
Thx for the help,

I had this command after "| Format-List -Property StatusMessage" -Confirm:$false so it would only display a small bit of the move text.

This was getting me error - dont know why

regards
Anders
0
 
BSonPoshCommented:
-confirm is a parameter for move-mailbox and should be before the pipe.
0
 
andersjensenAuthor Commented:
Also had after -Confirm - just put my words in wrong order :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.