Then they fixed it for Exchange 2010, because the Identity parameter can come from the pipe.
Sorry for not checking on 2007... ________________________________ From: Campbell, Rob [rob_campb...@centraltechnology.net] Sent: Tuesday, September 29, 2009 2:51 PM To: MS-Exchange Admin Issues Subject: RE: Piping files to Set-* I think I tried something like that once and couldn’t get it to work. When I checked it with get-command, it said none of the parameter sets accepted pipeline input so I decided it probably wasn’t going to be possible. I ended up using a script like this (it’s been scrubbed) to clone most of the properties from one resource to another when we upgraded from E2k3. It’s kind of a kludge, and I’d probably do it differently if I had to do it again, but FWIW: It will either clone all the properties directly (uncomment the #iex), or build a script you can tweak settings on or just do a search/replace on the mailbox name before you run it. I excluded Identity for obvious reasons, and the array properties. The array properties could be added, but it would take some additional code. I didn’t need them at the time, so I just left then out. $mbx = <target mailbox> if ($mbx -match "\s"){$mbx = "'" + $mbx + "'"} $rsc_base = get-mailboxcalendarsettings <source mailbox> $rsc_props = $rsc_base | Get-Member -MemberType Property $cmds = @() $rsc_props |%{ $setting = $($rsc_base.($_.name)) $excluded = "Identity","RequestInPolicy","RequestOutOfPolicy","ResourceDelegates" if ($excluded -notcontains $_.name.tostring()){ if ($setting.tostring() -eq "False"){$setting = '$False'} if ($setting.tostring() -eq "True"){$setting = '$True'} if ($setting.tostring() -match "\s"){$setting = "'" + $setting + "'"} } $cmd_str = "set-mailboxcalendarsettings $mbx -" + $_.name + " $setting" $cmds += $cmd_str #iex $cmd_str } $cmds | Out-File set_resourcesettings.ps1 From: Michael B. Smith [mailto:mich...@owa.smithcons.com] Sent: Tuesday, September 29, 2009 1:27 PM To: MS-Exchange Admin Issues Subject: RE: Piping files to Set-* It's not even that hard get-mailboxcalendarsettings "template calendar" | set-mailboxcalendarsettings -param1 value -param2 value etc. etc. ________________________________ From: Eric Woodford [ericwoodf...@gmail.com] Sent: Tuesday, September 29, 2009 12:46 PM To: MS-Exchange Admin Issues Subject: Re: Piping files to Set-* I'd think you could attempt to play with the -instance switch on the command. $Master = get-mailboxcalendarsettings "Master Conference Room" $Master.displayname = "New Conference Room name" Set-MailboxCalendarSettings -identity "NewConferenceRoom" -instance $Master I have not tested this, ended up writing a reusable script that grants same settings for all new conference rooms. Reference: http://technet.microsoft.com/en-us/library/aa996340.aspx On Tue, Sep 29, 2009 at 7:23 AM, Sobey, Richard A <r.so...@imperial.ac.uk<mailto:r.so...@imperial.ac.uk>> wrote: All, This is more of a Powershell question, but it’s relating to an Exchange problem, so hopefully someone can help me. I’ve got a resource mailbox configured just right, and I’m going to be creating a few more in the next couple of weeks. Is there any way I can export the configuration of the existing mailbox and use it to set up the new mailboxes correctly, instead of manually entering all the various parameters into Set-MailboxCalendarSettings? Thanks Richard ************************************************************************************************** Note: The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. **************************************************************************************************