Converting Powershell commands to automated scripts
Hi I run Exchange 2007 and have a wide variety of commands I need to use. For instance: set-mailbox -identity USER -ProhibitSendQuota 2097152 What I'd like to do is save these as scripts on an Exchange server so that all I need to do is click the file (or whatever) and the script runs and just asks me for the values I need to enter. So, for example, for the one above, I'd call it "Set Mailbox PSQ.PS1". I'd run that and it would just ask me for the mailbox name of the user I'd want to do this for. What's the best way to do this?
April 12th, 2011 3:29pm

Joe, It should be something like this: $mailbox = Read-Host "Mailbox: " set-mailbox -identity $mailbox -ProhibitedSendQuota 2097152 Regards, JohanExchange-blog: www.johanveldhuis.nl
Free Windows Admin Tool Kit Click here and download it now
April 12th, 2011 4:58pm

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

Other recent topics Other recent topics