I have a powershell cmdlet (move-IMAPMailboxToExchange) that requires a lot of repetition to enter. I want to call it with another batch/powershell script that just takes two args from the command line. I've tried every calling convention I can think of but I can't make it work.
I want this:
Move-IMAPMailboxToExchange -SourcePassword P@ssW0rd! -allowunsecureconnection -sourceLoginId username -sourceserver source.ser.ver -sourceidentity email@example.com targetclientaccessserver "client.access.ser.ver" -targetidentity firstname.lastname@example.org -verbose
To be this:
migrate-user username P@ssW0rd!
I've tried $args, but that seems to expand. I've tried $args which works in the bareword password and sourcelogin, but doesn't work next to the @mail.... I've tried %1, etc, from the old DOS days but that doesn't work.
I'm a unix dork and I'm not quite grokking powershell yet.